diff options
author | 2016-01-10 16:36:18 -0500 | |
---|---|---|
committer | 2016-01-10 16:36:18 -0500 | |
commit | 115db95642ad6d861aad63775b92350e0491f2dd (patch) | |
tree | 8e7538ca804610335bff1927dc3b4d974b4c06da /src/emu/distate.h | |
parent | 2a2a4a3c6e255c479d5072d02c2a40949f611ea6 (diff) |
Return std::string objects by value rather than pass by reference
- strprintf is unaltered, but strformat now takes one fewer argument
- state_string_export still fills a buffer, but has been made const
- get_default_card_software now takes no arguments but returns a string
Diffstat (limited to 'src/emu/distate.h')
-rw-r--r-- | src/emu/distate.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/distate.h b/src/emu/distate.h index f762bd9fb13..67734fefa4b 100644 --- a/src/emu/distate.h +++ b/src/emu/distate.h @@ -87,7 +87,7 @@ protected: // return the current value -- only for our friends who handle export bool needs_export() const { return ((m_flags & DSF_EXPORT) != 0); } UINT64 value() const; - std::string &format(std::string &dest, const char *string, bool maxout = false) const; + std::string format(const char *string, bool maxout = false) const; // set the current value -- only for our friends who handle import bool needs_import() const { return ((m_flags & DSF_IMPORT) != 0); } @@ -128,7 +128,7 @@ public: // state getters UINT64 state_int(int index); - std::string &state_string(int index, std::string &dest); + std::string state_string(int index) const; int state_string_max_length(int index); offs_t pc() { return state_int(STATE_GENPC); } offs_t pcbase() { return state_int(STATE_GENPCBASE); } @@ -163,13 +163,13 @@ protected: virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); virtual void state_string_import(const device_state_entry &entry, std::string &str); - virtual void state_string_export(const device_state_entry &entry, std::string &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str) const; // internal operation overrides virtual void interface_post_start() override; // find the entry for a given index - const device_state_entry *state_find_entry(int index); + const device_state_entry *state_find_entry(int index) const; // constants static const int FAST_STATE_MIN = -4; // range for fast state |