From 172ad2fcc34b567eab9eca1f907cd99574fa031e Mon Sep 17 00:00:00 2001 From: hop311 Date: Thu, 29 Aug 2024 19:54:58 +0100 Subject: Remove unnecessary asserts + make `vec2_t(T val)` constructor explicit --- src/openvic-simulation/map/ProvinceDefinition.cpp | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/openvic-simulation/map/ProvinceDefinition.cpp') 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; -- cgit v1.2.3-56-ga3b1