aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/country/CountryDefinition.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-07-17 00:57:50 +0200
committer hop311 <hop3114@gmail.com>2024-07-17 00:58:05 +0200
commitf83e869def6608f64606aead24ad1cfbb6f5c72a (patch)
treefae6a1086f3ae698c4fb3f18340c5ed5f580c889 /src/openvic-simulation/country/CountryDefinition.hpp
parente8a3b33f13ebdf3a388b4996308b4db9763dc375 (diff)
Add IndexedMap and use in low key count, high value density casesindexed-map
Diffstat (limited to 'src/openvic-simulation/country/CountryDefinition.hpp')
-rw-r--r--src/openvic-simulation/country/CountryDefinition.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/openvic-simulation/country/CountryDefinition.hpp b/src/openvic-simulation/country/CountryDefinition.hpp
index 70e62b9..f04796a 100644
--- a/src/openvic-simulation/country/CountryDefinition.hpp
+++ b/src/openvic-simulation/country/CountryDefinition.hpp
@@ -41,14 +41,13 @@ namespace OpenVic {
};
/* Generic information about a TAG */
- struct CountryDefinition : HasIdentifierAndColour {
+ struct CountryDefinition : HasIdentifierAndColour, HasIndex<> {
friend struct CountryDefinitionManager;
using unit_names_map_t = ordered_map<UnitType const*, name_list_t>;
using government_colour_map_t = ordered_map<GovernmentType const*, colour_t>;
private:
- const size_t PROPERTY(index);
GraphicalCultureType const& PROPERTY(graphical_culture);
/* Not const to allow elements to be moved, otherwise a copy is forced
* which causes a compile error as the copy constructor has been deleted. */
@@ -62,7 +61,7 @@ namespace OpenVic {
// Unit colours not const due to being added after construction
CountryDefinition(
- std::string_view new_identifier, colour_t new_colour, size_t new_index,
+ std::string_view new_identifier, colour_t new_colour, index_t new_index,
GraphicalCultureType const& new_graphical_culture, IdentifierRegistry<CountryParty>&& new_parties,
unit_names_map_t&& new_unit_names, bool new_dynamic_tag, government_colour_map_t&& new_alternative_colours,
colour_t new_primary_unit_colour, colour_t new_secondary_unit_colour, colour_t new_tertiary_unit_colour