binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Add std::vector::reserve to BinaryView::GetAllEntryFunctions()

Open monotonik-guy opened this issue 2 months ago • 0 comments

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;
}

monotonik-guy avatar Nov 29 '25 01:11 monotonik-guy