binaryninja-api
binaryninja-api copied to clipboard
Add std::vector::reserve to BinaryView::GetAllEntryFunctions()
For some reason for this API reserve not used. I might to create PR, but don't have PC nearly.
vector<Ref<Function>> BinaryView::GetAllEntryFunctions()
{
size_t count;
BNFunction** funcs = BNGetAllEntryFunctions(m_object, &count);
if (count == 0)
return {};
vector<Ref<Function>> result;
for (size_t i = 0; i < count; i++)
result.push_back(new Function(BNNewFunctionReference(funcs[i])));
BNFreeFunctionList(funcs, count);
return result;
}