From df30910b06f6a3854aa9eaf4e0f835936ba5ada4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 28 Jul 2015 22:32:34 -0400 Subject: [PATCH] UICommon: Pass string by const reference for HostDisassemblerLLVM --- Source/Core/UICommon/Disassembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/UICommon/Disassembler.cpp b/Source/Core/UICommon/Disassembler.cpp index 795ff57307..174a0cc788 100644 --- a/Source/Core/UICommon/Disassembler.cpp +++ b/Source/Core/UICommon/Disassembler.cpp @@ -31,7 +31,7 @@ private: class HostDisassemblerLLVM : public HostDisassembler { public: - HostDisassemblerLLVM(const std::string host_disasm, int inst_size = -1, const std::string cpu = ""); + HostDisassemblerLLVM(const std::string& host_disasm, int inst_size = -1, const std::string& cpu = ""); ~HostDisassemblerLLVM() { if (m_can_disasm) @@ -46,7 +46,7 @@ private: std::string DisassembleHostBlock(const u8* code_start, const u32 code_size, u32* host_instructions_count) override; }; -HostDisassemblerLLVM::HostDisassemblerLLVM(const std::string host_disasm, int inst_size, const std::string cpu) +HostDisassemblerLLVM::HostDisassemblerLLVM(const std::string& host_disasm, int inst_size, const std::string& cpu) : m_can_disasm(false), m_instruction_size(inst_size) { LLVMInitializeAllTargetInfos();