summaryrefslogtreecommitdiff
path: root/functiongraphblock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'functiongraphblock.cpp')
-rw-r--r--functiongraphblock.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/functiongraphblock.cpp b/functiongraphblock.cpp
index 20b2515b..469fb175 100644
--- a/functiongraphblock.cpp
+++ b/functiongraphblock.cpp
@@ -89,10 +89,13 @@ const vector<DisassemblyTextLine>& FunctionGraphBlock::GetLines()
BNDisassemblyTextLine* lines = BNGetFunctionGraphBlockLines(m_object, &count);
vector<DisassemblyTextLine> result;
+ result.reserve(count);
for (size_t i = 0; i < count; i++)
{
DisassemblyTextLine line;
line.addr = lines[i].addr;
+ line.instrIndex = lines[i].instrIndex;
+ line.tokens.reserve(lines[i].count);
for (size_t j = 0; j < lines[i].count; j++)
{
InstructionTextToken token;
@@ -125,6 +128,7 @@ const vector<FunctionGraphEdge>& FunctionGraphBlock::GetOutgoingEdges()
BNFunctionGraphEdge* edges = BNGetFunctionGraphBlockOutgoingEdges(m_object, &count);
vector<FunctionGraphEdge> result;
+ result.reserve(count);
for (size_t i = 0; i < count; i++)
{
FunctionGraphEdge edge;