From 1683859e333f98fb63f1c72d926bb366a3b89f0b Mon Sep 17 00:00:00 2001 From: zaaarf Date: Wed, 22 Nov 2023 17:16:34 +0100 Subject: chore: use PROPERTY and its variants when possible --- src/openvic-simulation/economy/BuildingInstance.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/openvic-simulation/economy/BuildingInstance.cpp') diff --git a/src/openvic-simulation/economy/BuildingInstance.cpp b/src/openvic-simulation/economy/BuildingInstance.cpp index 417cdda..597b89e 100644 --- a/src/openvic-simulation/economy/BuildingInstance.cpp +++ b/src/openvic-simulation/economy/BuildingInstance.cpp @@ -3,17 +3,13 @@ using namespace OpenVic; BuildingInstance::BuildingInstance(BuildingType const& new_building_type, level_t new_level) - : HasIdentifier { building_type.get_identifier() }, building_type { new_building_type }, level { new_level }, + : HasIdentifier { new_building_type.get_identifier() }, building_type { new_building_type }, level { new_level }, expansion_state { ExpansionState::CannotExpand } {} bool BuildingInstance::_can_expand() const { return level < building_type.get_max_level(); } -void BuildingInstance::set_level(BuildingInstance::level_t new_level) { - level = new_level; -} - bool BuildingInstance::expand() { if (expansion_state == ExpansionState::CanExpand) { expansion_state = ExpansionState::Preparing; -- cgit v1.2.3-56-ga3b1