From 3647ff159a2f2445c45d9cbb4f8791b5f30da16b Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 13 Feb 2024 16:09:35 -0800 Subject: Used std::vector::reserve when I meant std::vector::resize. The Linux std has more asserts enabled by default, so it complained, even though this worked on Darwin... --- lldb/source/Commands/CommandObjectCommands.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectCommands.cpp') diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 3dfd452..b7cd650 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -1419,9 +1419,9 @@ private: m_options_definition_up.reset(new OptionDefinition[m_num_options]); // We need to hand out pointers to contents of these vectors; we reserve // as much as we'll need up front so they don't get freed on resize... - m_usage_container.reserve(m_num_options); - m_enum_storage.reserve(m_num_options); - m_enum_vector.reserve(m_num_options); + m_usage_container.resize(m_num_options); + m_enum_storage.resize(m_num_options); + m_enum_vector.resize(m_num_options); size_t counter = 0; size_t short_opt_counter = 0; -- cgit v1.1