From 4f6308bc7ceec7a0f3e21d8d616268b401bd7ec3 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 13 Feb 2022 14:57:59 -0500 Subject: Delete some unnecessary c_str() calls --- src/emu/debug/debugvw.cpp | 4 ++-- src/osd/modules/debugger/qt/mainwindow.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index 5bcc3d057b8..54fe57ecf5a 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -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); } } diff --git a/src/osd/modules/debugger/qt/mainwindow.cpp b/src/osd/modules/debugger/qt/mainwindow.cpp index b0043c06dee..afea2e07919 100644 --- a/src/osd/modules/debugger/qt/mainwindow.cpp +++ b/src/osd/modules/debugger/qt/mainwindow.cpp @@ -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(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); } } -- cgit v1.2.3