diff options
author | 2016-01-11 09:18:43 +0100 | |
---|---|---|
committer | 2016-01-11 09:18:43 +0100 | |
commit | 36195292e370de0fb6b32085c105a236995ce36e (patch) | |
tree | 1fb147c3e21824272b60e4989f606bc9c206030c /src/devices/cpu/drcbex64.cpp | |
parent | 7c944fa3b02cd26dec3c27f1e6a4c0d33f462c4e (diff) | |
parent | 115db95642ad6d861aad63775b92350e0491f2dd (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/drcbex64.cpp')
-rw-r--r-- | src/devices/cpu/drcbex64.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp index 5b2b2cb2eb5..034f06def80 100644 --- a/src/devices/cpu/drcbex64.cpp +++ b/src/devices/cpu/drcbex64.cpp @@ -787,7 +787,6 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3 x86code *dst = base; // generate code - std::string tempstring; const char *blockname = nullptr; for (int inum = 0; inum < numinst; inum++) { @@ -797,8 +796,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3 // add a comment if (m_log != nullptr) { - std::string dasm; - inst.disasm(dasm, &m_drcuml); + std::string dasm = inst.disasm(&m_drcuml); x86log_add_comment(m_log, dst, "%s", dasm.c_str()); } @@ -808,7 +806,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3 if (inst.opcode() == OP_HANDLE) blockname = inst.param(0).handle().string(); else if (inst.opcode() == OP_HASH) - blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); + blockname = strformat("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); } // generate code |