From 0cc77206c79257d49013c3a3ed1bf889c85b10d1 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Sun, 14 Jan 2018 03:42:04 -0500 Subject: Container Memory Reservations. --- lowlevelilinstruction.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lowlevelilinstruction.cpp') diff --git a/lowlevelilinstruction.cpp b/lowlevelilinstruction.cpp index d85e4f17..53b1e390 100644 --- a/lowlevelilinstruction.cpp +++ b/lowlevelilinstruction.cpp @@ -178,15 +178,16 @@ unordered_map> }; -static unordered_map> - GetOperandIndexForOperandUsages() +static unordered_map> GetOperandIndexForOperandUsages() { unordered_map> result; + result.reserve(LowLevelILInstructionBase::operationOperandUsage.size()); for (auto& operation : LowLevelILInstructionBase::operationOperandUsage) { result[operation.first] = unordered_map(); size_t operand = 0; + result[operation.first].reserve(operation.second.size()); for (auto usage : operation.second) { result[operation.first][usage] = operand; @@ -377,7 +378,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 -- cgit v1.3.1