diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-12-24 23:00:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-24 23:00:36 +0100 |
commit | bf4e7368600bb425b6612231fbb84de34ec99a27 (patch) | |
tree | d3b29714d3286b9edbe380f877bbce541344a635 /src/openvic-simulation/map/Region.cpp | |
parent | f036506b88af02508242f279ca29b743ef713976 (diff) | |
parent | 3770de7a03879a8ff6b8cf22b402217c19fa2b53 (diff) |
Merge pull request #100 from OpenVicProject/change/colour_t_to_struct
Diffstat (limited to 'src/openvic-simulation/map/Region.cpp')
-rw-r--r-- | src/openvic-simulation/map/Region.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openvic-simulation/map/Region.cpp b/src/openvic-simulation/map/Region.cpp index e33d9c9..18a47a9 100644 --- a/src/openvic-simulation/map/Region.cpp +++ b/src/openvic-simulation/map/Region.cpp @@ -1,5 +1,7 @@ #include "Region.hpp" +#include "openvic-simulation/types/Colour.hpp" + using namespace OpenVic; ProvinceSet::ProvinceSet(provinces_t&& new_provinces) : provinces { std::move(new_provinces) } {} @@ -65,11 +67,11 @@ ProvinceSet::provinces_t const& ProvinceSet::get_provinces() const { return provinces; } -static constexpr colour_t ERROR_REGION_COLOUR = COLOUR_COMPONENT << 16; +static constexpr colour_t ERROR_REGION_COLOUR { colour_t::max_value, 0, 0 }; Region::Region(std::string_view new_identifier, provinces_t&& new_provinces, bool new_meta) : HasIdentifierAndColour { - new_identifier, new_provinces.size() > 0 ? new_provinces.front()->get_colour() : ERROR_REGION_COLOUR, false, false + new_identifier, new_provinces.size() > 0 ? new_provinces.front()->get_colour() : ERROR_REGION_COLOUR, false }, ProvinceSet { std::move(new_provinces) }, meta { new_meta } { lock(); } |