diff options
| author | Brian Potchik <brian@vector35.com> | 2018-01-14 03:42:04 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2018-01-14 03:42:04 -0500 |
| commit | 0cc77206c79257d49013c3a3ed1bf889c85b10d1 (patch) | |
| tree | 7c5ddd2f6e7d4c84e622064c74ca25873f82b97b /functiongraph.cpp | |
| parent | 4866de9b9f0ef32dfa568aa38faafdfd4def4638 (diff) | |
Container Memory Reservations.
Diffstat (limited to 'functiongraph.cpp')
| -rw-r--r-- | functiongraph.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/functiongraph.cpp b/functiongraph.cpp index 7e5ec079..77754913 100644 --- a/functiongraph.cpp +++ b/functiongraph.cpp @@ -110,6 +110,7 @@ vector<Ref<FunctionGraphBlock>> FunctionGraph::GetBlocks() BNFunctionGraphBlock** blocks = BNGetFunctionGraphBlocks(m_graph, &count); vector<Ref<FunctionGraphBlock>> result; + result.reserve(count); for (size_t i = 0; i < count; i++) { auto block = m_cachedBlocks.find(blocks[i]); @@ -148,6 +149,7 @@ vector<Ref<FunctionGraphBlock>> FunctionGraph::GetBlocksInRegion(int left, int t BNFunctionGraphBlock** blocks = BNGetFunctionGraphBlocksInRegion(m_graph, left, top, right, bottom, &count); vector<Ref<FunctionGraphBlock>> result; + result.reserve(count); for (size_t i = 0; i < count; i++) { auto block = m_cachedBlocks.find(blocks[i]); |
