diff options
author | Vas Crabb <vas@vastheman.com> | 2016-02-28 11:09:00 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2016-02-28 13:36:19 +1100 |
commit | aec01e740736db267e452f0ed5947649f79e3408 (patch) | |
tree | 633ca7d80a756bfcc05d871817201c729e55142d /src/osd/windows/winmain.cpp | |
parent | 3cba23966f6c1c6f9ee616e5af00ebcfcb0d0b0a (diff) |
Replace strformat, strprintf and strcatprintf with type-safe steam_format and string_format
Update MAME to use new function
Instantiate ODR-used static constant members
Make some of the UI code more localisable
Remove use of retired functions in tools
Diffstat (limited to 'src/osd/windows/winmain.cpp')
-rw-r--r-- | src/osd/windows/winmain.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp index bd2e9c4b11e..1171775d042 100644 --- a/src/osd/windows/winmain.cpp +++ b/src/osd/windows/winmain.cpp @@ -590,11 +590,9 @@ void windows_osd_interface::init(running_machine &machine) osd_common_t::init_subsystems(); // notify listeners of screen configuration - std::string tempstring; for (win_window_info *info = win_window_list; info != nullptr; info = info->m_next) { - strprintf(tempstring, "Orientation(%s)", info->m_monitor->devicename()); - machine.output().set_value(tempstring.c_str(), info->m_targetorient); + machine.output().set_value(string_format("Orientation(%s)", info->m_monitor->devicename()).c_str(), info->m_targetorient); } // hook up the debugger log @@ -1029,7 +1027,7 @@ symbol_manager::symbol_manager(const char *argv0) #endif // expand the buffer to be decently large up front - strprintf(m_buffer,"%500s", ""); + m_buffer = string_format("%500s", ""); } @@ -1296,13 +1294,13 @@ bool symbol_manager::parse_map_line(const char *line, FPTR &address, std::string void symbol_manager::format_symbol(const char *name, UINT32 displacement, const char *filename, int linenumber) { // start with the address and offset - strprintf(m_buffer, " (%s", name); + m_buffer = string_format(" (%s", name); if (displacement != 0) - strcatprintf(m_buffer, "+0x%04x", (UINT32)displacement); + m_buffer.append(string_format("+0x%04x", (UINT32)displacement)); // append file/line if present if (filename != nullptr) - strcatprintf(m_buffer, ", %s:%d", filename, linenumber); + m_buffer.append(string_format(", %s:%d", filename, linenumber)); // close up the string m_buffer.append(")"); |