summaryrefslogtreecommitdiff
path: root/lowlevelilinstruction.cpp
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2018-01-14 03:42:04 -0500
committerPeter LaFosse <peter@vector35.com>2018-03-23 17:10:06 -0400
commit5f263139ad405f0ecd751f40ccb103e966c2ae64 (patch)
treef18377d2f54f6d203c529df592610dce3bef4002 /lowlevelilinstruction.cpp
parent86da0eb0216f0d778cce9885ea16588c0a2b0728 (diff)
Container Memory Reservations.
Diffstat (limited to 'lowlevelilinstruction.cpp')
-rw-r--r--lowlevelilinstruction.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lowlevelilinstruction.cpp b/lowlevelilinstruction.cpp
index 6b67ef72..611bd431 100644
--- a/lowlevelilinstruction.cpp
+++ b/lowlevelilinstruction.cpp
@@ -220,15 +220,16 @@ unordered_map<BNLowLevelILOperation, vector<LowLevelILOperandUsage>>
};
-static unordered_map<BNLowLevelILOperation, unordered_map<LowLevelILOperandUsage, size_t>>
- GetOperandIndexForOperandUsages()
+static unordered_map<BNLowLevelILOperation, unordered_map<LowLevelILOperandUsage, size_t>> GetOperandIndexForOperandUsages()
{
unordered_map<BNLowLevelILOperation, unordered_map<LowLevelILOperandUsage, size_t>> result;
+ result.reserve(LowLevelILInstructionBase::operationOperandUsage.size());
for (auto& operation : LowLevelILInstructionBase::operationOperandUsage)
{
result[operation.first] = unordered_map<LowLevelILOperandUsage, size_t>();
size_t operand = 0;
+ result[operation.first].reserve(operation.second.size());
for (auto usage : operation.second)
{
result[operation.first][usage] = operand;
@@ -474,7 +475,7 @@ uint64_t LowLevelILIntegerList::ListIterator::operator*()
LowLevelILIntegerList::LowLevelILIntegerList(LowLevelILFunction* func,
- const BNLowLevelILInstruction& instr, size_t count)
+const BNLowLevelILInstruction& instr, size_t count)
{
m_start.function = func;
#ifdef BINARYNINJACORE_LIBRARY