summaryrefslogtreecommitdiff
path: root/functiongraphblock.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-04-04 14:11:55 -0400
committerPeter LaFosse <peter@vector35.com>2018-04-04 14:11:55 -0400
commitd990d5ebf56eb0f1a7d96e98577cb9ace9dac19d (patch)
tree752649d87db23f95a59384f5325b94b734e1c27b /functiongraphblock.cpp
parent1eb3683b3a1ee0d263267b1e84957fadea7fadaa (diff)
parentfa716fe2da53a4f136380b1f60197bd197b2793a (diff)
Merging with dev
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;