summaryrefslogtreecommitdiff
path: root/function.cpp
diff options
context:
space:
mode:
authorScott Lagler <laglerscott@gmail.com>2025-12-09 22:08:06 -0500
committerGlenn Smith <glenn@vector35.com>2025-12-16 17:39:41 -0500
commit3967000448807875468673398445854536525610 (patch)
treeec8e5b7638fdb18540fcdddad0b623df0d28e8a6 /function.cpp
parent908a18947d34b06da936a464a69f71e9e0a4eec3 (diff)
Add missing std::vector reserve calls
# Conflicts: # function.cpp
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);