aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/GoodDefinition.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-07-17 00:57:50 +0200
committer hop311 <hop3114@gmail.com>2024-07-17 00:58:05 +0200
commitf83e869def6608f64606aead24ad1cfbb6f5c72a (patch)
treefae6a1086f3ae698c4fb3f18340c5ed5f580c889 /src/openvic-simulation/economy/GoodDefinition.hpp
parente8a3b33f13ebdf3a388b4996308b4db9763dc375 (diff)
Add IndexedMap and use in low key count, high value density casesindexed-map
Diffstat (limited to 'src/openvic-simulation/economy/GoodDefinition.hpp')
-rw-r--r--src/openvic-simulation/economy/GoodDefinition.hpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/openvic-simulation/economy/GoodDefinition.hpp b/src/openvic-simulation/economy/GoodDefinition.hpp
index 0a3ad5c..3050243 100644
--- a/src/openvic-simulation/economy/GoodDefinition.hpp
+++ b/src/openvic-simulation/economy/GoodDefinition.hpp
@@ -28,18 +28,15 @@ namespace OpenVic {
* ECON-238, ECON-239, ECON-240, ECON-241, ECON-242, ECON-243, ECON-244, ECON-245, ECON-246, ECON-247, ECON-248, ECON-249,
* ECON-250, ECON-251, ECON-252, ECON-253, ECON-254, ECON-255, ECON-256, ECON-257, ECON-258, ECON-259, ECON-260, ECON-261
*/
- struct GoodDefinition : HasIdentifierAndColour {
+ struct GoodDefinition : HasIdentifierAndColour, HasIndex<> {
friend struct GoodDefinitionManager;
- using index_t = size_t;
-
using price_t = fixed_point_t;
static constexpr price_t NULL_PRICE = fixed_point_t::_0();
using good_definition_map_t = fixed_point_map_t<GoodDefinition const*>;
private:
- const index_t PROPERTY(index);
GoodCategory const& PROPERTY(category);
const price_t PROPERTY(base_price);
const bool PROPERTY_CUSTOM_PREFIX(available_from_start, is);