diff options
author | 2017-08-10 09:59:20 +1000 | |
---|---|---|
committer | 2017-08-10 10:07:31 +1000 | |
commit | bc4bfb40051f912b8afe78bc99ab98383b2e7c15 (patch) | |
tree | 2a8cc876c501c78bb3ddccd6f67206d8c9590bee /src/devices/sound/disc_sys.hxx | |
parent | 147f1d89b0a42ddd33c4f89abaed2765bc86dd8f (diff) |
Remove a whole lot of I64 from format strings.
There are a couple of issues here:
* Firstly, the determining factor for whether I64 or ll is needed as the
size qualifier doesn't depend entirely on whether you're using MSVC or
not, it depends on the the C runtime library. The msys64 C runtime
apes the Microsoft runtime and requires I64 as well, so a lot of files
where LLFORMAT had been copy/pasted wouldn't work right if you
depeneded on it anyway.
* Secondly, one of the major benefits of util::string_format,
util::stream_format and logerror in their current forms is that you
don't need size specifiers for integers at all (unless you're using
them to truncate a value, but in that case you're better off casting
the argument for clarity). If you do use them, logerror and friends
will accept both Microsoft- and SUS-style independently of the C
runtime.
So please everyone, don't go gratuitously throwing these around, and if
you must use them (e.g. for osd_printf_* functions), make sure your
conditionals are actually correct. Also, conisder using
util::string_format to do the formatting into a temporary string and
just feeding that to the output function so you can avoid the mess.
Diffstat (limited to 'src/devices/sound/disc_sys.hxx')
-rw-r--r-- | src/devices/sound/disc_sys.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/sound/disc_sys.hxx b/src/devices/sound/disc_sys.hxx index 5c1a79f0ec9..a83b26f30ed 100644 --- a/src/devices/sound/disc_sys.hxx +++ b/src/devices/sound/disc_sys.hxx @@ -61,7 +61,7 @@ DISCRETE_STEP( dso_csvlog ) int nodenum; /* Dump any csv logs */ - fprintf(m_csv_file, "%s", string_format("%I64d", ++m_sample_num).c_str()); + fprintf(m_csv_file, "%s", string_format("%d", ++m_sample_num).c_str()); for (nodenum = 0; nodenum < this->active_inputs(); nodenum++) { fprintf(m_csv_file, ", %f", *this->m_input[nodenum]); |