From 3967000448807875468673398445854536525610 Mon Sep 17 00:00:00 2001 From: Scott Lagler Date: Tue, 9 Dec 2025 22:08:06 -0500 Subject: Add missing std::vector reserve calls # Conflicts: # function.cpp --- debuginfo.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debuginfo.cpp') diff --git a/debuginfo.cpp b/debuginfo.cpp index b3f14383..ec02db4b 100644 --- a/debuginfo.cpp +++ b/debuginfo.cpp @@ -91,13 +91,16 @@ vector DebugInfo::GetFunctions(const string& parserName) cons return {}; vector result; + result.reserve(count); for (size_t i = 0; i < count; ++i) { vector components; + components.reserve(functions[i].componentN); for (size_t componentN = 0; componentN < functions[i].componentN; ++componentN) components.emplace_back(functions[i].components[componentN]); vector localVariables; + localVariables.reserve(functions[i].localVariableN); for (size_t localVariableN = 0; localVariableN < functions[i].localVariableN; ++localVariableN) { auto& bnVar = functions[i].localVariables[localVariableN]; -- cgit v1.3.1