Skip to content

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

@monotonik-guy

Description

@monotonik-guy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: APIIssue needs changes to the APIEffort: TrivialIssues require < 1 day of workImpact: LowIssue is a papercut or has a good, supported workaround

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions