From 268a6948c0400905dfc335427395519689f067f5 Mon Sep 17 00:00:00 2001 From: hop311 Date: Mon, 22 Jan 2024 20:02:58 +0000 Subject: Added reserve_more, expect_dictionary_key[s|_map]_reserve_length[_and_default] --- src/openvic-simulation/economy/Good.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/openvic-simulation/economy/Good.cpp') diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp index d674a68..961a82d 100644 --- a/src/openvic-simulation/economy/Good.cpp +++ b/src/openvic-simulation/economy/Good.cpp @@ -64,7 +64,7 @@ bool GoodManager::load_goods_file(ast::NodeCPtr root) { } )(root); lock_good_categories(); - goods.reserve(goods.size() + total_expected_goods); + reserve_more_goods(total_expected_goods); ret &= expect_good_category_dictionary([this](GoodCategory const& good_category, ast::NodeCPtr good_category_value) -> bool { return expect_dictionary([this, &good_category](std::string_view key, ast::NodeCPtr value) -> bool { colour_t colour = colour_t::null(); -- cgit v1.2.3-56-ga3b1