aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/GoodDefinition.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-08-29 20:54:58 +0200
committer hop311 <hop3114@gmail.com>2024-08-29 20:54:58 +0200
commit172ad2fcc34b567eab9eca1f907cd99574fa031e (patch)
treebedfa97590a31eb5f2871b7921e48423d1ddabde /src/openvic-simulation/economy/GoodDefinition.cpp
parent5813948cd3ed6432de374664650d68afbff71915 (diff)
Remove unnecessary asserts + make `vec2_t(T val)` constructor explicitremove-asserts
Diffstat (limited to 'src/openvic-simulation/economy/GoodDefinition.cpp')
-rw-r--r--src/openvic-simulation/economy/GoodDefinition.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/openvic-simulation/economy/GoodDefinition.cpp b/src/openvic-simulation/economy/GoodDefinition.cpp
index 104764b..892592d 100644
--- a/src/openvic-simulation/economy/GoodDefinition.cpp
+++ b/src/openvic-simulation/economy/GoodDefinition.cpp
@@ -1,20 +1,28 @@
#include "GoodDefinition.hpp"
-#include <cassert>
-
using namespace OpenVic;
using namespace OpenVic::NodeTools;
GoodCategory::GoodCategory(std::string_view new_identifier) : HasIdentifier { new_identifier } {}
GoodDefinition::GoodDefinition(
- std::string_view new_identifier, colour_t new_colour, index_t new_index, GoodCategory const& new_category,
- price_t new_base_price, bool new_available_from_start, bool new_tradeable, bool new_money, bool new_overseas_penalty
-) : HasIdentifierAndColour { new_identifier, new_colour, false }, HasIndex { new_index }, category { new_category },
- base_price { new_base_price }, available_from_start { new_available_from_start }, tradeable { new_tradeable },
- money { new_money }, overseas_penalty { new_overseas_penalty } {
- assert(base_price > NULL_PRICE);
-}
+ std::string_view new_identifier,
+ colour_t new_colour,
+ index_t new_index,
+ GoodCategory const& new_category,
+ price_t new_base_price,
+ bool new_available_from_start,
+ bool new_tradeable,
+ bool new_money,
+ bool new_overseas_penalty
+) : HasIdentifierAndColour { new_identifier, new_colour, false },
+ HasIndex { new_index },
+ category { new_category },
+ base_price { new_base_price },
+ available_from_start { new_available_from_start },
+ tradeable { new_tradeable },
+ money { new_money },
+ overseas_penalty { new_overseas_penalty } {}
bool GoodDefinitionManager::add_good_category(std::string_view identifier) {
if (identifier.empty()) {