aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/ProvinceDefinition.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-08-30 01:22:08 +0200
committer GitHub <noreply@github.com>2024-08-30 01:22:08 +0200
commit68fca4f504e7f178f69d0dfd64e90ffb1d579322 (patch)
treebedfa97590a31eb5f2871b7921e48423d1ddabde /src/openvic-simulation/map/ProvinceDefinition.cpp
parent5813948cd3ed6432de374664650d68afbff71915 (diff)
parent172ad2fcc34b567eab9eca1f907cd99574fa031e (diff)
Merge pull request #187 from OpenVicProject/remove-asserts
Remove unnecessary asserts + make `vec2_t(T val)` constructor explicit
Diffstat (limited to 'src/openvic-simulation/map/ProvinceDefinition.cpp')
-rw-r--r--src/openvic-simulation/map/ProvinceDefinition.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/openvic-simulation/map/ProvinceDefinition.cpp b/src/openvic-simulation/map/ProvinceDefinition.cpp
index 4f34c1e..14828e8 100644
--- a/src/openvic-simulation/map/ProvinceDefinition.cpp
+++ b/src/openvic-simulation/map/ProvinceDefinition.cpp
@@ -8,13 +8,23 @@ using namespace OpenVic;
using namespace OpenVic::NodeTools;
ProvinceDefinition::ProvinceDefinition(
- std::string_view new_identifier, colour_t new_colour, index_t new_index
-) : HasIdentifierAndColour { new_identifier, new_colour, true }, HasIndex { new_index }, region { nullptr },
- climate { nullptr }, continent { nullptr }, on_map { false }, water { false }, coastal { false },
- port { false }, port_adjacent_province { nullptr }, default_terrain_type { nullptr }, adjacencies {}, centre {},
- positions {} {
- assert(index != NULL_INDEX);
-}
+ std::string_view new_identifier,
+ colour_t new_colour,
+ index_t new_index
+) : HasIdentifierAndColour { new_identifier, new_colour, true },
+ HasIndex { new_index },
+ region { nullptr },
+ climate { nullptr },
+ continent { nullptr },
+ on_map { false },
+ water { false },
+ coastal { false },
+ port { false },
+ port_adjacent_province { nullptr },
+ default_terrain_type { nullptr },
+ adjacencies {},
+ centre {},
+ positions {} {}
bool ProvinceDefinition::operator==(ProvinceDefinition const& other) const {
return this == &other;