Delete some unnecessary c_str() calls

This commit is contained in:
AJR 2022-02-13 14:57:59 -05:00
parent be4008cbb2
commit 4f6308bc7c
2 changed files with 5 additions and 5 deletions

View File

@ -503,11 +503,11 @@ bool debug_view_expression::recompute()
std::string oldstring(m_parsed.original_string());
try
{
m_parsed.parse(m_string.c_str());
m_parsed.parse(m_string);
}
catch (expression_error &)
{
m_parsed.parse(oldstring.c_str());
m_parsed.parse(oldstring);
}
}

View File

@ -220,7 +220,7 @@ void MainWindow::toggleBreakpointAtCursor(bool changedTo)
command = string_format("bpset 0x%X", address);
else
command = string_format("bpclear 0x%X", bp->index());
m_machine.debugger().console().execute_command(command.c_str(), true);
m_machine.debugger().console().execute_command(command, true);
}
refreshAll();
@ -242,7 +242,7 @@ void MainWindow::enableBreakpointAtCursor(bool changedTo)
{
int32_t const bpindex = bp->index();
std::string command = string_format(bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", bpindex);
m_machine.debugger().console().execute_command(command.c_str(), true);
m_machine.debugger().console().execute_command(command, true);
}
}
@ -257,7 +257,7 @@ void MainWindow::runToCursor(bool changedTo)
{
offs_t address = downcast<debug_view_disasm*>(dasmView)->selected_address();
std::string command = string_format("go 0x%X", address);
m_machine.debugger().console().execute_command(command.c_str(), true);
m_machine.debugger().console().execute_command(command, true);
}
}