From 115db95642ad6d861aad63775b92350e0491f2dd Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 10 Jan 2016 16:36:18 -0500 Subject: 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 --- src/emu/distate.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/emu/distate.h') 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 -- cgit v1.2.3-70-g09d2