From 88ce545cdda64659894b87fc0b98e1b044eea3e0 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 18 Nov 2019 05:08:36 +1100 Subject: misc cleanup: * Got rid of some more simple_list in core debugger code * Fixed a buffer overrun in wavwrite (buffer half requried size) * Slightly reduced dependencies and overhead in wavwrite * Made new disassembly windows in Qt debugger default to current CPU --- src/emu/debug/express.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/emu/debug/express.cpp') diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp index bcd9269db30..45fad747ab3 100644 --- a/src/emu/debug/express.cpp +++ b/src/emu/debug/express.cpp @@ -200,8 +200,7 @@ const char *expression_error::code_string() const //------------------------------------------------- symbol_entry::symbol_entry(symbol_table &table, symbol_type type, const char *name, const std::string &format) - : m_next(nullptr), - m_table(table), + : m_table(table), m_type(type), m_name(name), m_format(format) @@ -560,7 +559,7 @@ void parsed_expression::parse(const char *expression) // copy the string and reset our parsing state m_original_string.assign(expression); m_tokenlist.reset(); - m_stringlist.reset(); + m_stringlist.clear(); // first parse the tokens into the token array in order parse_string_into_tokens(); @@ -1072,7 +1071,7 @@ void parsed_expression::parse_quoted_string(parse_token &token, const char *&str string++; // make the token - token.configure_string(m_stringlist.append(*global_alloc(expression_string(buffer.c_str())))); + token.configure_string(m_stringlist.emplace(m_stringlist.end(), buffer.c_str())->c_str()); } @@ -1089,7 +1088,7 @@ void parsed_expression::parse_memory_operator(parse_token &token, const char *st const char *dot = strrchr(string, '.'); if (dot != nullptr) { - namestring = m_stringlist.append(*global_alloc(expression_string(string, dot - string))); + namestring = m_stringlist.emplace(m_stringlist.end(), string, dot)->c_str(); string = dot + 1; } -- cgit v1.2.3