From f83e869def6608f64606aead24ad1cfbb6f5c72a Mon Sep 17 00:00:00 2001 From: hop311 Date: Tue, 16 Jul 2024 23:57:50 +0100 Subject: Add IndexedMap and use in low key count, high value density cases --- src/openvic-simulation/economy/GoodDefinition.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/openvic-simulation/economy/GoodDefinition.hpp') 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; 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); -- cgit v1.2.3-56-ga3b1