remove redundant c_str -> string -> c_str conversions

This commit is contained in:
Peter Tissen 2014-04-01 17:22:57 +02:00
parent 8ac226ae69
commit febe8624bf
7 changed files with 9 additions and 9 deletions

View file

@ -393,7 +393,7 @@ s64 CPUThread::ExecAsCallback(u64 pc, bool wait, u64 a1, u64 a2, u64 a3, u64 a4)
{
if (Emu.IsStopped())
{
ConLog.Warning("ExecAsCallback(wait=%s) aborted", std::string(wait ? "true" : "false").c_str());
ConLog.Warning("ExecAsCallback(wait=%s) aborted", wait ? "true" : "false");
return CELL_EABORT; // doesn't mean anything
}
Sleep(1);

View file

@ -173,8 +173,8 @@ void StaticAnalyse(void* ptr, u32 size, u32 base)
else
{
ConLog.Error("Function group [%s] failed:%s%s", std::string(name, 9).c_str(),
std::string(res & GSR_MISSING ? " missing;" : "").c_str(),
std::string(res & GSR_EXCESS ? " excess;" : "").c_str());
(res & GSR_MISSING ? " missing;" : ""),
(res & GSR_EXCESS ? " excess;" : ""));
}
}
}

View file

@ -359,12 +359,12 @@ void default_syscall()
case 999:
dump_enable = !dump_enable;
Emu.Pause();
ConLog.Warning("Dump %s", std::string(dump_enable ? "enabled" : "disabled").c_str());
ConLog.Warning("Dump %s", (dump_enable ? "enabled" : "disabled"));
return;
case 1000:
Ini.HLELogging.SetValue(!Ini.HLELogging.GetValue());
ConLog.Warning("Log %s", std::string(Ini.HLELogging.GetValue() ? "enabled" : "disabled").c_str());
ConLog.Warning("Log %s", (Ini.HLELogging.GetValue() ? "enabled" : "disabled"));
return;
}

View file

@ -421,7 +421,7 @@ extern int sys_rsx_device_map(mem32_t a1, mem32_t a2, u32 a3);
extern int sys_rsx_device_unmap();
extern int sys_rsx_attribute();
#define UNIMPLEMENTED_FUNC(module) module.Error("Unimplemented function: %s", std::string(__FUNCTION__).c_str())
#define UNIMPLEMENTED_FUNC(module) module.Error("Unimplemented function: %s", __FUNCTION__)
#define SC_ARG_0 CPU.GPR[3]
#define SC_ARG_1 CPU.GPR[4]

View file

@ -46,7 +46,7 @@ int sys_mutex_create(mem32_t mutex_id, mem_ptr_t<sys_mutex_attribute> attr)
mutex->m_mutex.unlock(tid);
sys_mtx.Warning("*** mutex created [%s] (protocol=0x%x, recursive=%s): id = %d",
std::string(attr->name, 8).c_str(), (u32) attr->protocol,
std::string(is_recursive ? "true" : "false").c_str(), mutex_id.GetValue());
(is_recursive ? "true" : "false"), mutex_id.GetValue());
// TODO: unlock mutex when owner thread does exit

View file

@ -132,7 +132,7 @@ int sys_spu_thread_initialize(mem32_t thread, u32 group, u32 spu_num, mem_ptr_t<
(*(SPUThread*)&new_thread).group = group_info;
sc_spu.Warning("*** New SPU Thread [%s] (img_offset=0x%x, ls_offset=0x%x, ep=0x%x, a1=0x%llx, a2=0x%llx, a3=0x%llx, a4=0x%llx): id=%d",
std::string(attr->name_addr ? name : "").c_str(), (u32) img->segs_addr, ((SPUThread&) new_thread).dmac.ls_offset, spu_ep, a1, a2, a3, a4, thread.GetValue());
(attr->name_addr ? name.c_str() : ""), (u32) img->segs_addr, ((SPUThread&) new_thread).dmac.ls_offset, spu_ep, a1, a2, a3, a4, thread.GetValue());
return CELL_OK;
}

View file

@ -862,7 +862,7 @@ void MainFrame::UpdateUI(wxCommandEvent& event)
//send_exit.Enable(false);
bool enable_commands = !is_stopped && Emu.GetCallbackManager().m_exit_callback.m_callbacks.GetCount();
send_open_menu.SetItemLabel(wxString::Format("Send %s system menu cmd", std::string(m_sys_menu_opened ? "close" : "open").c_str()));
send_open_menu.SetItemLabel(wxString::Format("Send %s system menu cmd", (m_sys_menu_opened ? "close" : "open")));
send_open_menu.Enable(enable_commands);
send_exit.Enable(enable_commands);