diff options
author | Vas Crabb <vas@vastheman.com> | 2019-09-26 20:53:06 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2019-09-26 20:53:06 +1000 |
commit | 9a12ab37afb3e43d9d3c296b34348b835bafb2ea (patch) | |
tree | 6af7ce1fc5f52b1518100a1be926514cd2f34feb /src/emu/diimage.cpp | |
parent | 9d4b7b02acdb79fac05606f57c3fddd08593cba8 (diff) |
Make osd_printf_* use util/strformat semantics.
(nw) This has been a long time coming but it's here at last. It should
be easier now that logerror, popmessage and osd_printf_* behave like
string_format and stream_format. Remember the differences from printf:
* Any object with a stream out operator works with %s
* %d, %i, %o, %x, %X, etc. work out the size by magic
* No sign extending promotion to int for short/char
* No widening/narrowing conversions for characters/strings
* Same rules on all platforms, insulated from C runtime library
* No format warnings from compiler
* Assert in debug builds if number of arguments doesn't match format
(nw) Also removed a pile of redundant c_str and string_format, and some
workarounds for not being able to portably format 64-bit integers or
long long.
Diffstat (limited to 'src/emu/diimage.cpp')
-rw-r--r-- | src/emu/diimage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index 953e89dc42c..542091471a2 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -842,8 +842,8 @@ std::vector<u32> device_image_interface::determine_open_plan(bool is_create) static void dump_wrong_and_correct_checksums(const util::hash_collection &hashes, const util::hash_collection &acthashes) { - osd_printf_error(" EXPECTED: %s\n", hashes.macro_string().c_str()); - osd_printf_error(" FOUND: %s\n", acthashes.macro_string().c_str()); + osd_printf_error(" EXPECTED: %s\n", hashes.macro_string()); + osd_printf_error(" FOUND: %s\n", acthashes.macro_string()); } @@ -918,9 +918,9 @@ bool device_image_interface::load_software(software_list_device &swlist, const c u32 supported = swinfo->supported(); if (supported == SOFTWARE_SUPPORTED_PARTIAL) - osd_printf_error("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name().c_str()); + osd_printf_error("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name()); if (supported == SOFTWARE_SUPPORTED_NO) - osd_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name().c_str()); + osd_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); // attempt reading up the chain through the parents and create a locationtag std::string in the format // " swlist % clonename % parentname " @@ -1051,7 +1051,7 @@ done: if (device().machine().phase() == machine_phase::RUNNING) device().popmessage("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, error()); else - osd_printf_error("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path.c_str(), error()); + osd_printf_error("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, error()); } clear(); } |