summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine.cpp')
-rw-r--r--src/emu/machine.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 4d8b24243d6..7f8f532ddf7 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -176,7 +176,7 @@ running_machine::~running_machine()
// PC
//-------------------------------------------------
-const char *running_machine::describe_context()
+std::string running_machine::describe_context() const
{
device_execute_interface *executing = m_scheduler.currently_executing();
if (executing != nullptr)
@@ -185,13 +185,11 @@ const char *running_machine::describe_context()
if (cpu != nullptr)
{
address_space &prg = cpu->space(AS_PROGRAM);
- m_context = string_format(prg.is_octal() ? "'%s' (%0*o)" : "'%s' (%0*X)", cpu->tag(), prg.logaddrchars(), cpu->pc());
+ return string_format(prg.is_octal() ? "'%s' (%0*o)" : "'%s' (%0*X)", cpu->tag(), prg.logaddrchars(), cpu->pc());
}
}
- else
- m_context.assign("(no context)");
- return m_context.c_str();
+ return std::string("(no context)");
}