summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/cosmac/cosmac.cpp
diff options
context:
space:
mode:
author Miodrag Milanović <mmicko@gmail.com>2016-01-11 09:18:43 +0100
committer Miodrag Milanović <mmicko@gmail.com>2016-01-11 09:18:43 +0100
commit36195292e370de0fb6b32085c105a236995ce36e (patch)
tree1fb147c3e21824272b60e4989f606bc9c206030c /src/devices/cpu/cosmac/cosmac.cpp
parent7c944fa3b02cd26dec3c27f1e6a4c0d33f462c4e (diff)
parent115db95642ad6d861aad63775b92350e0491f2dd (diff)
Merge pull request #561 from ajrhacker/strings
Return std::string objects by value rather than pass by reference [ajrhacker]
Diffstat (limited to 'src/devices/cpu/cosmac/cosmac.cpp')
-rw-r--r--src/devices/cpu/cosmac/cosmac.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp
index 73170762cbf..d8e3d52c6fd 100644
--- a/src/devices/cpu/cosmac/cosmac.cpp
+++ b/src/devices/cpu/cosmac/cosmac.cpp
@@ -353,9 +353,8 @@ void cosmac_device::device_start()
state_add(COSMAC_I, "I", m_i).mask(0xf);
state_add(COSMAC_N, "N", m_n).mask(0xf);
- std::string tempstr;
for (int regnum = 0; regnum < 16; regnum++)
- state_add(COSMAC_R0 + regnum, strformat(tempstr, "R%x", regnum).c_str(), m_r[regnum]);
+ state_add(COSMAC_R0 + regnum, strformat("R%x", regnum).c_str(), m_r[regnum]);
state_add(COSMAC_DF, "DF", m_df).mask(0x1).noshow();
state_add(COSMAC_IE, "IE", m_ie).mask(0x1).noshow();
@@ -469,7 +468,7 @@ void cosmac_device::state_export(const device_state_entry &entry)
// for the debugger
//-------------------------------------------------
-void cosmac_device::state_string_export(const device_state_entry &entry, std::string &str)
+void cosmac_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
switch (entry.index())
{