summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/dvbpoints.cpp
diff options
context:
space:
mode:
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
commitaec01e740736db267e452f0ed5947649f79e3408 (patch)
tree633ca7d80a756bfcc05d871817201c729e55142d /src/emu/debug/dvbpoints.cpp
parent3cba23966f6c1c6f9ee616e5af00ebcfcb0d0b0a (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/emu/debug/dvbpoints.cpp')
-rw-r--r--src/emu/debug/dvbpoints.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/emu/debug/dvbpoints.cpp b/src/emu/debug/dvbpoints.cpp
index efb604e385d..1606f596ddf 100644
--- a/src/emu/debug/dvbpoints.cpp
+++ b/src/emu/debug/dvbpoints.cpp
@@ -134,7 +134,7 @@ void debug_view_breakpoints::enumerate_sources()
for (device_disasm_interface *dasm = iter.first(); dasm != nullptr; dasm = iter.next())
{
std::string name;
- strprintf(name, "%s '%s'", dasm->device().name(), dasm->device().tag());
+ name = string_format("%s '%s'", dasm->device().name(), dasm->device().tag());
m_source_list.append(*global_alloc(debug_view_source(name.c_str(), &dasm->device())));
}
@@ -190,14 +190,7 @@ void debug_view_breakpoints::view_click(const int button, const debug_view_xy& p
void debug_view_breakpoints::pad_astring_to_length(std::string& str, int len)
{
- int diff = len - str.length();
- if (diff > 0)
- {
- std::string buffer;
- for (int i = 0; i < diff; i++)
- strcatprintf(buffer, " ");
- strcatprintf(str, "%s", buffer.c_str());
- }
+ str = string_format("%-*s", std::max(len, 0), str);
}
@@ -236,7 +229,7 @@ void debug_view_breakpoints::view_update()
// Draw
debug_view_char *dest = &m_viewdata[0];
- std::string linebuf;
+ std::string linebuf;
// Header
if (m_visible.y > 0)
@@ -282,8 +275,7 @@ void debug_view_breakpoints::view_update()
{
device_debug::breakpoint *const bp = m_buffer[bpi];
- linebuf.clear();
- strcatprintf(linebuf, "%2X", bp->index());
+ linebuf = string_format("%2X", bp->index());
pad_astring_to_length(linebuf, tableBreaks[0]);
linebuf.push_back(bp->enabled() ? 'X' : 'O');
pad_astring_to_length(linebuf, tableBreaks[1]);