Ghidra is a software reverse engineering (SRE) framework
Use emplace instead of copy constructor
Bill Biermanf56473e6047e
diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.ccindex f628a6ff19..cb0848a4de 100644--- a/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc+++ b/Ghidra/Features/Decompiler/src/decompile/cpp/sleigh_arch.cc@@ -181,8 +181,9 @@ Translate *SleighArchitecture::buildTranslator(DocumentStorage &store)iter->second.reset(loader, context);return &iter->second;}- translators[languageindex] = Sleigh(loader,context);- return &translators[languageindex];+ pair<map<int4,Sleigh>::iterator,bool> res;+ res = translators.emplace(piecewise_construct,forward_as_tuple(languageindex),forward_as_tuple(loader,context));+ return &(*res.first).second;}PcodeInjectLibrary *SleighArchitecture::buildPcodeInjectLibrary(void)