aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2024-01-01 04:32:01 +0100
committer GitHub <noreply@github.com>2024-01-01 04:32:01 +0100
commit9988b21278dc1c8df044631bd2935a7e450a7bff (patch)
treeba081f9f4d74865ab5851a2efd560745900ca81a /src/openvic-simulation/economy
parent0a425fbe05d6138b753c0e4a7c06f06695bde8af (diff)
parente1496a87178d925277aceed0ebcbab06920e15ee (diff)
Merge pull request #105 from OpenVicProject/add/ordered-map
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/ProductionType.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/economy/ProductionType.cpp b/src/openvic-simulation/economy/ProductionType.cpp
index 05529f5..f0ad6ea 100644
--- a/src/openvic-simulation/economy/ProductionType.cpp
+++ b/src/openvic-simulation/economy/ProductionType.cpp
@@ -1,5 +1,7 @@
#include "ProductionType.hpp"
+#include "openvic-simulation/types/OrderedContainers.hpp"
+
using namespace OpenVic;
using namespace OpenVic::NodeTools;
@@ -130,8 +132,8 @@ bool ProductionTypeManager::load_production_types_file(
size_t expected_types = 0;
// pass 1: find and store template identifiers
- std::set<std::string_view> templates;
- std::map<std::string_view, std::string_view> template_target_map;
+ ordered_set<std::string_view> templates;
+ ordered_map<std::string_view, std::string_view> template_target_map;
bool ret = expect_dictionary(
[this, &expected_types, &templates, &template_target_map](std::string_view key, ast::NodeCPtr value) -> bool {
expected_types++;
@@ -154,7 +156,7 @@ bool ProductionTypeManager::load_production_types_file(
)(root);
// pass 2: create and populate the template map
- std::map<std::string_view, ast::NodeCPtr> template_node_map;
+ ordered_map<std::string_view, ast::NodeCPtr> template_node_map;
ret &= expect_dictionary(
[this, &expected_types, &templates, &template_node_map](std::string_view key, ast::NodeCPtr value) -> bool {
if (templates.contains(key)) {