diff options
| author | Mark Rowe <mark@vector35.com> | 2025-07-14 18:24:35 -0700 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-07-14 22:52:24 -0700 |
| commit | 22c2873ccff4de8dcfbfa8c99388f934cd860740 (patch) | |
| tree | 036e538e96faad5bcd870433a846c3065d541b66 /highlevelilinstruction.cpp | |
| parent | 88d5365bff3f1fbbb2dff5aee3b0acbf94eef4cf (diff) | |
Reserve vector capacity when populating vectors in conversion operators
Diffstat (limited to 'highlevelilinstruction.cpp')
| -rw-r--r-- | highlevelilinstruction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/highlevelilinstruction.cpp b/highlevelilinstruction.cpp index ce0e72ee..964e1af9 100644 --- a/highlevelilinstruction.cpp +++ b/highlevelilinstruction.cpp @@ -321,6 +321,7 @@ uint64_t HighLevelILIntegerList::operator[](size_t i) const HighLevelILIntegerList::operator vector<uint64_t>() const { vector<uint64_t> result; + result.reserve(size()); for (auto i : *this) result.push_back(i); return result; @@ -375,6 +376,7 @@ size_t HighLevelILIndexList::operator[](size_t i) const HighLevelILIndexList::operator vector<size_t>() const { vector<size_t> result; + result.reserve(size()); for (auto i : *this) result.push_back(i); return result; @@ -440,6 +442,7 @@ const HighLevelILInstruction HighLevelILInstructionList::operator[](size_t i) co HighLevelILInstructionList::operator vector<HighLevelILInstruction>() const { vector<HighLevelILInstruction> result; + result.reserve(size()); for (auto i : *this) result.push_back(i); return result; @@ -498,6 +501,7 @@ const SSAVariable HighLevelILSSAVariableList::operator[](size_t i) const HighLevelILSSAVariableList::operator vector<SSAVariable>() const { vector<SSAVariable> result; + result.reserve(size()); for (auto i : *this) result.push_back(i); return result; @@ -651,6 +655,7 @@ const HighLevelILOperand HighLevelILOperandList::operator[](size_t i) const HighLevelILOperandList::operator vector<HighLevelILOperand>() const { vector<HighLevelILOperand> result; + result.reserve(size()); for (auto i : *this) result.push_back(i); return result; |
