diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-12-19 03:41:57 +0100 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-12-24 22:57:56 +0100 |
commit | 3770de7a03879a8ff6b8cf22b402217c19fa2b53 (patch) | |
tree | 0d77d82ab8cea8955e2b86d883d1c2fd10813717 /src/openvic-simulation/country/Country.cpp | |
parent | 14e47d58b85f657ec1fed8abf88219f09bd3efbb (diff) |
Change colour_t to be a strongly typed structure
Make RGB default of `colour_t`
Distinguish RGB and ARGB colors by type and colour_traits
Add `_colour` and `_argb` colour user-defined literals
Add `OpenVic::utility::unreachable`
Diffstat (limited to 'src/openvic-simulation/country/Country.cpp')
-rw-r--r-- | src/openvic-simulation/country/Country.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/openvic-simulation/country/Country.cpp b/src/openvic-simulation/country/Country.cpp index cb4de8a..299407c 100644 --- a/src/openvic-simulation/country/Country.cpp +++ b/src/openvic-simulation/country/Country.cpp @@ -31,7 +31,7 @@ Country::Country( std::string_view new_identifier, colour_t new_colour, 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 -) : HasIdentifierAndColour { new_identifier, new_colour, false, false }, graphical_culture { new_graphical_culture }, +) : HasIdentifierAndColour { new_identifier, new_colour, false }, graphical_culture { new_graphical_culture }, parties { std::move(new_parties) }, unit_names { std::move(new_unit_names) }, dynamic_tag { new_dynamic_tag }, alternative_colours { std::move(new_alternative_colours) } {} @@ -50,10 +50,6 @@ bool CountryManager::add_country( ); return false; } - if (colour > MAX_COLOUR_RGB) { - Logger::error("Invalid country colour for ", identifier, ": ", colour_to_hex_string(colour)); - return false; - } if (graphical_culture == nullptr) { Logger::error("Null graphical culture for country ", identifier); return false; |