diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2020-12-21 22:47:30 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2020-12-21 22:47:30 -0500 |
commit | 0a5d207e667075f4ea0618339d971c0f977d9ce1 (patch) | |
tree | 9ccac3725e3ed25e4ab56fe43a4a50d821d54e0d /src/emu | |
parent | 1ed70b0181557558aa2e685f7f7bbe81a54d0626 (diff) |
Eliminate many unnecessary c_str calls
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/addrmap.cpp | 6 | ||||
-rw-r--r-- | src/emu/device.cpp | 2 | ||||
-rw-r--r-- | src/emu/distate.cpp | 2 | ||||
-rw-r--r-- | src/emu/emumem.cpp | 2 | ||||
-rw-r--r-- | src/emu/emuopts.cpp | 2 | ||||
-rw-r--r-- | src/emu/ioport.cpp | 4 | ||||
-rw-r--r-- | src/emu/mconfig.cpp | 2 | ||||
-rw-r--r-- | src/emu/sound.cpp | 2 | ||||
-rw-r--r-- | src/emu/xtal.cpp | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index 7aeefd7baca..fab866a17d5 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -892,7 +892,7 @@ void address_map::import_submaps(running_machine &machine, device_t &owner, int { mapdevice = owner.subdevice(entry->m_read.m_tag); if (mapdevice == nullptr) - throw emu_fatalerror("Attempted to submap a non-existent device '%s' in space %d of device '%s'\n", owner.subtag(entry->m_read.m_tag).c_str(), m_spacenum, m_device->basetag()); + throw emu_fatalerror("Attempted to submap a non-existent device '%s' in space %d of device '%s'\n", owner.subtag(entry->m_read.m_tag), m_spacenum, m_device->basetag()); } // Grab the submap @@ -1296,7 +1296,7 @@ void address_map::map_validity_check(validity_checker &valid, int spacenum) cons break; } if (devtag.second && !devtag.first.get().subdevice(devtag.second)) - osd_printf_error("%s space memory map entry reads from nonexistent device '%s'\n", spaceconfig.m_name, devtag.first.get().subtag(devtag.second).c_str()); + osd_printf_error("%s space memory map entry reads from nonexistent device '%s'\n", spaceconfig.m_name, devtag.first.get().subtag(devtag.second)); #ifndef MAME_DEBUG // assert will catch this earlier (void)entry.unitmask_is_appropriate(entry.m_read.m_bits, entry.m_mask, entry.m_read.m_name); #endif @@ -1368,7 +1368,7 @@ void address_map::map_validity_check(validity_checker &valid, int spacenum) cons break; } if (devtag.second && !devtag.first.get().subdevice(devtag.second)) - osd_printf_error("%s space memory map entry writes to nonexistent device '%s'\n", spaceconfig.m_name, devtag.first.get().subtag(devtag.second).c_str()); + osd_printf_error("%s space memory map entry writes to nonexistent device '%s'\n", spaceconfig.m_name, devtag.first.get().subtag(devtag.second)); #ifndef MAME_DEBUG // assert will catch this earlier (void)entry.unitmask_is_appropriate(entry.m_write.m_bits, entry.m_mask, entry.m_write.m_name); #endif diff --git a/src/emu/device.cpp b/src/emu/device.cpp index 00f3645ca32..60f406342c4 100644 --- a/src/emu/device.cpp +++ b/src/emu/device.cpp @@ -613,7 +613,7 @@ void device_t::start() // have the views register their state if (!m_viewlist.empty()) - osd_printf_verbose("%s: Registering %d views\n", m_tag.c_str(), int(m_viewlist.size())); + osd_printf_verbose("%s: Registering %d views\n", m_tag, int(m_viewlist.size())); for (memory_view *view : m_viewlist) view->register_state(); diff --git a/src/emu/distate.cpp b/src/emu/distate.cpp index e01609615d4..cd47948abd2 100644 --- a/src/emu/distate.cpp +++ b/src/emu/distate.cpp @@ -128,7 +128,7 @@ void device_state_entry::format_from_mask() // make up a format based on the mask if (m_datamask == 0) - throw emu_fatalerror("%s state entry requires a nonzero mask\n", m_symbol.c_str()); + throw emu_fatalerror("%s state entry requires a nonzero mask\n", m_symbol); int width = 0; for (u64 tempmask = m_datamask; tempmask != 0; tempmask >>= 4) width++; diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp index a06423d8e2f..3f8dde789b1 100644 --- a/src/emu/emumem.cpp +++ b/src/emu/emumem.cpp @@ -960,7 +960,7 @@ void memory_bank::set_entry(int entrynum) if (entrynum < 0 || entrynum >= int(m_entries.size())) throw emu_fatalerror("memory_bank::set_entry called with out-of-range entry %d", entrynum); if (m_entries[entrynum] == nullptr) - throw emu_fatalerror("memory_bank::set_entry called for bank '%s' with invalid bank entry %d", m_tag.c_str(), entrynum); + throw emu_fatalerror("memory_bank::set_entry called for bank '%s' with invalid bank entry %d", m_tag, entrynum); m_curentry = entrynum; } diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 690756a7011..6c4ec9d2655 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -885,7 +885,7 @@ emu_options::software_options emu_options::evaluate_initial_softlist_options(con machine_config config(*m_system, *this); software_list_device_enumerator iter(config.root_device()); if (iter.count() == 0) - throw emu_fatalerror(EMU_ERR_FATALERROR, "Error: unknown option: %s\n", software_identifier.c_str()); + throw emu_fatalerror(EMU_ERR_FATALERROR, "Error: unknown option: %s\n", software_identifier); // and finally set up the stack std::stack<std::string> software_identifier_stack; diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 0ea6dd59d59..fbc3bfe7fbc 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -3060,7 +3060,7 @@ ioport_configurer& ioport_configurer::port_modify(const char *tag) // find the existing port m_curport = m_portlist.find(fulltag)->second.get(); if (m_curport == nullptr) - throw emu_fatalerror("Requested to modify nonexistent port '%s'", fulltag.c_str()); + throw emu_fatalerror("Requested to modify nonexistent port '%s'", fulltag); // bump the modification count, and reset current field/setting m_curport->m_modcount++; @@ -3114,7 +3114,7 @@ ioport_configurer& ioport_configurer::field_add_char(std::initializer_list<char3 util::stream_format(s, "%s%d", is_first ? "" : ",", (int)ch); is_first = false; } - throw emu_fatalerror("PORT_CHAR(%s) could not be added - maximum amount exceeded\n", s.str().c_str()); + throw emu_fatalerror("PORT_CHAR(%s) could not be added - maximum amount exceeded\n", s.str()); } diff --git a/src/emu/mconfig.cpp b/src/emu/mconfig.cpp index 32b82468c3a..c2a09ec8df7 100644 --- a/src/emu/mconfig.cpp +++ b/src/emu/mconfig.cpp @@ -272,7 +272,7 @@ std::pair<const char *, device_t *> machine_config::resolve_owner(const char *ta part.assign(tag, next - tag); owner = owner->subdevices().find(part); if (!owner) - throw emu_fatalerror("Could not find %s when looking up path for device %s\n", part.c_str(), orig_tag); + throw emu_fatalerror("Could not find %s when looking up path for device %s\n", part, orig_tag); tag = next+1; } assert(tag[0] != '\0'); diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 95bc85bc4ae..252c7fc469a 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -833,7 +833,7 @@ void sound_stream::apply_sample_rate_changes(u32 updatenum, u32 downstream_rate) #if (SOUND_DEBUG) void sound_stream::print_graph_recursive(int indent, int index) { - osd_printf_info("%*s%s Ch.%d @ %d\n", indent, "", name().c_str(), index + m_output_base, sample_rate()); + osd_printf_info("%*s%s Ch.%d @ %d\n", indent, "", name(), index + m_output_base, sample_rate()); for (int index = 0; index < m_input.size(); index++) if (m_input[index].valid()) { diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index afaa452544c..191af34db68 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -543,7 +543,7 @@ void XTAL::fail(double base_clock, const std::string &message) else full_message += util::string_format(" Did you mean %.0f?", xtal_error_low ? xtal_error_low : xtal_error_high); full_message += util::string_format(" Context: %s\n", message); - fatalerror("%s\n", full_message.c_str()); + fatalerror("%s\n", full_message); } /* |