summaryrefslogtreecommitdiffstats
path: root/src/emu/save.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/save.cpp')
-rw-r--r--src/emu/save.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/save.cpp b/src/emu/save.cpp
index 0a6cffd3983..4a5b3ef7ebf 100644
--- a/src/emu/save.cpp
+++ b/src/emu/save.cpp
@@ -146,24 +146,24 @@ void save_manager::register_postload(save_prepost_delegate func)
// memory
//-------------------------------------------------
-void save_manager::save_memory(device_t *device, const char *module, std::string tag, UINT32 index, const char *name, void *val, UINT32 valsize, UINT32 valcount)
+void save_manager::save_memory(device_t *device, const char *module, const char *tag, UINT32 index, const char *name, void *val, UINT32 valsize, UINT32 valcount)
{
assert(valsize == 1 || valsize == 2 || valsize == 4 || valsize == 8);
// check for invalid timing
if (!m_reg_allowed)
{
- machine().logerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag.c_str(), name);
+ machine().logerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name);
if (machine().system().flags & MACHINE_SUPPORTS_SAVE)
- fatalerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag.c_str(), name);
+ fatalerror("Attempt to register save state entry after state registration is closed!\nModule %s tag %s name %s\n", module, tag, name);
m_illegal_regs++;
return;
}
// create the full name
std::string totalname;
- if (!tag.empty())
- strprintf(totalname, "%s/%s/%X/%s", module, tag.c_str(), index, name);
+ if (tag != nullptr)
+ strprintf(totalname, "%s/%s/%X/%s", module, tag, index, name);
else
strprintf(totalname, "%s/%X/%s", module, index, name);
@@ -182,7 +182,7 @@ void save_manager::save_memory(device_t *device, const char *module, std::string
}
// insert us into the list
- m_entry_list.insert_after(*global_alloc(state_entry(val, totalname.c_str(), device, module, tag, index, valsize, valcount)), insert_after);
+ m_entry_list.insert_after(*global_alloc(state_entry(val, totalname.c_str(), device, module, tag ? tag : "", index, valsize, valcount)), insert_after);
}
@@ -418,7 +418,7 @@ save_manager::state_callback::state_callback(save_prepost_delegate callback)
// state_entry - constructor
//-------------------------------------------------
-state_entry::state_entry(void *data, const char *name, device_t *device, const char *module, std::string tag, int index, UINT8 size, UINT32 count)
+state_entry::state_entry(void *data, const char *name, device_t *device, const char *module, const char *tag, int index, UINT8 size, UINT32 count)
: m_next(nullptr),
m_data(data),
m_name(name),