From 6138978808829172448615980742756831959788 Mon Sep 17 00:00:00 2001 From: Scott Lagler Date: Fri, 12 Dec 2025 19:20:21 -0500 Subject: Add more reserve calls --- type.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'type.cpp') diff --git a/type.cpp b/type.cpp index 086ac863..bd7dbaf2 100644 --- a/type.cpp +++ b/type.cpp @@ -758,6 +758,7 @@ std::vector Type::GetAttributes() const size_t count = 0; BNTypeAttribute* attributes = BNGetTypeAttributes(m_object, &count); std::vector result; + result.reserve(count); for (size_t i = 0; i < count; i++) result.emplace_back(attributes[i].name, attributes[i].value); BNFreeTypeAttributeList(attributes, count); @@ -2259,6 +2260,7 @@ std::vector TypeBuilder::GetAttributes() const size_t count; BNTypeAttribute* attributes = BNGetTypeBuilderAttributes(m_object, &count); std::vector result; + result.reserve(count); for (size_t i = 0; i < count; i++) result.emplace_back(attributes[i].name, attributes[i].value); BNFreeTypeAttributeList(attributes, count); -- cgit v1.3.1