Use emplace instead of copy constructor

This commit is contained in:
Bill Bierman 2024-09-12 07:07:24 -10:00
parent 37838c180a
commit f56473e604

View File

@ -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)