mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Kill some unnecessary c_str and use StrToWxStr in a few places that I missed.
This commit is contained in:
@ -253,7 +253,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
debugger->disasm(addr, disasm, 256);
|
||||
text = text + StringFromFormat("%08x: ", addr) + disasm + "\r\n";
|
||||
}
|
||||
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(text.c_str())));
|
||||
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(text)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -300,7 +300,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
{
|
||||
wxTextEntryDialog input_symbol(this, StrToWxStr("Rename symbol:"),
|
||||
wxGetTextFromUserPromptStr,
|
||||
StrToWxStr(symbol->name.c_str()));
|
||||
StrToWxStr(symbol->name));
|
||||
if (input_symbol.ShowModal() == wxID_OK)
|
||||
{
|
||||
symbol->name = WxStrToStr(input_symbol.GetValue());
|
||||
|
@ -345,7 +345,7 @@ void CCodeWindow::UpdateCallstack()
|
||||
|
||||
for (size_t i = 0; i < stack.size(); i++)
|
||||
{
|
||||
int idx = callstack->Append(StrToWxStr(stack[i].Name.c_str()));
|
||||
int idx = callstack->Append(StrToWxStr(stack[i].Name));
|
||||
callstack->SetClientData(idx, (void*)(u64)stack[i].vAddress);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ void CCodeWindow::Load()
|
||||
std::string fontDesc;
|
||||
ini.Get("General", "DebuggerFont", &fontDesc);
|
||||
if (!fontDesc.empty())
|
||||
DebuggerFont.SetNativeFontInfoUserDesc(StrToWxStr(fontDesc.c_str()));
|
||||
DebuggerFont.SetNativeFontInfoUserDesc(StrToWxStr(fontDesc));
|
||||
|
||||
// Boot to pause or not
|
||||
ini.Get("General", "AutomaticStart", &bAutomaticStart, false);
|
||||
@ -366,7 +366,7 @@ void CCodeWindow::NotifyMapLoaded()
|
||||
symbols->Clear();
|
||||
for (PPCSymbolDB::XFuncMap::iterator iter = g_symbolDB.GetIterator(); iter != g_symbolDB.End(); ++iter)
|
||||
{
|
||||
int idx = symbols->Append(StrToWxStr(iter->second.name.c_str()));
|
||||
int idx = symbols->Append(StrToWxStr(iter->second.name));
|
||||
symbols->SetClientData(idx, (void*)&iter->second);
|
||||
}
|
||||
symbols->Thaw();
|
||||
|
@ -221,7 +221,7 @@ void DSPDebuggerLLE::UpdateSymbolMap()
|
||||
for (SymbolDB::XFuncMap::iterator iter = DSPSymbols::g_dsp_symbol_db.GetIterator();
|
||||
iter != DSPSymbols::g_dsp_symbol_db.End(); ++iter)
|
||||
{
|
||||
int idx = m_SymbolList->Append(StrToWxStr(iter->second.name.c_str()));
|
||||
int idx = m_SymbolList->Append(StrToWxStr(iter->second.name));
|
||||
m_SymbolList->SetClientData(idx, (void*)&iter->second);
|
||||
}
|
||||
m_SymbolList->Thaw();
|
||||
|
@ -120,9 +120,9 @@ void CJitWindow::Compare(u32 em_address)
|
||||
}
|
||||
// Do not merge this "if" with the above - block_num changes inside it.
|
||||
if (block_num < 0) {
|
||||
ppc_box->SetValue(wxString::FromAscii(StringFromFormat("(non-code address: %08x)",
|
||||
em_address).c_str()));
|
||||
x86_box->SetValue(wxString::FromAscii(StringFromFormat("(no translation)").c_str()));
|
||||
ppc_box->SetValue(StrToWxStr(StringFromFormat("(non-code address: %08x)",
|
||||
em_address)));
|
||||
x86_box->SetValue(StrToWxStr(StringFromFormat("(no translation)")));
|
||||
delete[] xDis;
|
||||
return;
|
||||
}
|
||||
@ -151,7 +151,7 @@ void CJitWindow::Compare(u32 em_address)
|
||||
*sptr++ = 10;
|
||||
num_x86_instructions++;
|
||||
}
|
||||
x86_box->SetValue(wxString::FromAscii((char*)xDis));
|
||||
x86_box->SetValue(StrToWxStr((char*)xDis));
|
||||
|
||||
// == Fill in ppc box
|
||||
u32 ppc_addr = block->originalAddress;
|
||||
@ -190,11 +190,11 @@ void CJitWindow::Compare(u32 em_address)
|
||||
sptr += sprintf(sptr, "Num bytes: PPC: %i x86: %i (blowup: %i%%)\n",
|
||||
size * 4, block->codeSize, 100 * (block->codeSize / (4 * size) - 1));
|
||||
|
||||
ppc_box->SetValue(wxString::FromAscii((char*)xDis));
|
||||
ppc_box->SetValue(StrToWxStr((char*)xDis));
|
||||
} else {
|
||||
ppc_box->SetValue(wxString::FromAscii(StringFromFormat(
|
||||
"(non-code address: %08x)", em_address).c_str()));
|
||||
x86_box->SetValue(wxString::FromAscii("---"));
|
||||
ppc_box->SetValue(StrToWxStr(StringFromFormat(
|
||||
"(non-code address: %08x)", em_address)));
|
||||
x86_box->SetValue("---");
|
||||
}
|
||||
|
||||
delete[] xDis;
|
||||
|
Reference in New Issue
Block a user