aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic2/map/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extension/src/openvic2/map/Map.cpp')
-rw-r--r--extension/src/openvic2/map/Map.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/extension/src/openvic2/map/Map.cpp b/extension/src/openvic2/map/Map.cpp
index 1f44c43..f920ccc 100644
--- a/extension/src/openvic2/map/Map.cpp
+++ b/extension/src/openvic2/map/Map.cpp
@@ -8,7 +8,9 @@
using namespace OpenVic2;
Mapmode::Mapmode(index_t new_index, std::string const& new_identifier, colour_func_t new_colour_func)
- : HasIdentifier{ new_identifier }, index{ new_index }, colour_func{ new_colour_func } {
+ : HasIdentifier { new_identifier },
+ index { new_index },
+ colour_func { new_colour_func } {
assert(colour_func != nullptr);
}
@@ -20,7 +22,9 @@ colour_t Mapmode::get_colour(Map const& map, Province const& province) const {
return colour_func ? colour_func(map, province) : NULL_COLOUR;
}
-Map::Map() : provinces{ "provinces" }, regions{ "regions" }, mapmodes{ "mapmodes" } {}
+Map::Map() : provinces { "provinces" },
+ regions { "regions" },
+ mapmodes { "mapmodes" } {}
return_t Map::add_province(std::string const& identifier, colour_t colour) {
if (provinces.get_item_count() >= MAX_INDEX) {
@@ -35,7 +39,7 @@ return_t Map::add_province(std::string const& identifier, colour_t colour) {
Logger::error("Invalid province colour: ", Province::colour_to_hex_string(colour));
return FAILURE;
}
- Province new_province{ static_cast<index_t>(provinces.get_item_count() + 1), identifier, colour };
+ Province new_province { static_cast<index_t>(provinces.get_item_count() + 1), identifier, colour };
const index_t index = get_index_from_colour(colour);
if (index != NULL_INDEX) {
Logger::error("Duplicate province colours: ", get_province_by_index(index)->to_string(), " and ", new_province.to_string());
@@ -78,7 +82,7 @@ return_t Map::add_region(std::string const& identifier, std::vector<std::string>
Logger::error("Invalid region identifier - empty!");
return FAILURE;
}
- Region new_region{ identifier };
+ Region new_region { identifier };
return_t ret = SUCCESS;
for (std::string const& province_identifier : province_identifiers) {
Province* province = get_province_by_identifier(province_identifier);