mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
using emplace
This commit is contained in:
parent
3644c120c0
commit
5f715d73e3
34 changed files with 101 additions and 103 deletions
|
@ -193,7 +193,7 @@ CPoolRecord *ConstantPoolInternal::createRecord(const vector<uintb> &refs)
|
|||
{
|
||||
CheapSorter sorter(refs);
|
||||
pair<map<CheapSorter,CPoolRecord>::iterator,bool> res;
|
||||
res = cpoolMap.insert(pair<CheapSorter,CPoolRecord>(sorter,CPoolRecord()));
|
||||
res = cpoolMap.emplace(piecewise_construct,forward_as_tuple(sorter),forward_as_tuple());
|
||||
if (res.second == false)
|
||||
throw LowlevelError("Creating duplicate entry in constant pool: "+(*res.first).second.getToken());
|
||||
return &(*res.first).second;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue