summaryrefslogtreecommitdiff
path: root/function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'function.cpp')
-rw-r--r--function.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/function.cpp b/function.cpp
index 68704e4d..f28fda90 100644
--- a/function.cpp
+++ b/function.cpp
@@ -733,6 +733,7 @@ Confidence<vector<uint32_t>> Function::GetReturnRegisters() const
{
BNRegisterSetWithConfidence regs = BNGetFunctionReturnRegisters(m_object);
vector<uint32_t> regList;
+ regList.reserve(regs.count);
for (size_t i = 0; i < regs.count; i++)
regList.push_back(regs.regs[i]);
Confidence<vector<uint32_t>> result(regList, regs.confidence);