diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-05-02 11:25:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 11:25:32 +0200 |
commit | 9f772a314dc130df95fe5e3b018a9ba60e5be5b1 (patch) | |
tree | ab138ae3c615adeb51972b4bfff992dea86cd69c /extension/src/openvic2/map/Building.cpp | |
parent | be43b260128664756054a289cf9d22319def1f8a (diff) | |
parent | 112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 (diff) |
Merge pull request #97 from Spartan322/update/clang-format
Diffstat (limited to 'extension/src/openvic2/map/Building.cpp')
-rw-r--r-- | extension/src/openvic2/map/Building.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/extension/src/openvic2/map/Building.cpp b/extension/src/openvic2/map/Building.cpp index 1e26873..a2694b9 100644 --- a/extension/src/openvic2/map/Building.cpp +++ b/extension/src/openvic2/map/Building.cpp @@ -7,7 +7,8 @@ using namespace OpenVic2; -Building::Building(BuildingType const& new_type) : HasIdentifier{ new_type.get_identifier() }, type{ new_type } {} +Building::Building(BuildingType const& new_type) : HasIdentifier { new_type.get_identifier() }, + type { new_type } {} bool Building::_can_expand() const { return level < type.get_max_level(); @@ -74,8 +75,9 @@ void Building::tick(Date const& today) { } } -BuildingType::BuildingType(std::string const& new_identifier, Building::level_t new_max_level, Timespan new_build_time) : - HasIdentifier{ new_identifier }, max_level{ new_max_level }, build_time{ new_build_time } { +BuildingType::BuildingType(std::string const& new_identifier, Building::level_t new_max_level, Timespan new_build_time) : HasIdentifier { new_identifier }, + max_level { new_max_level }, + build_time { new_build_time } { assert(new_max_level >= 0); assert(build_time >= 0); } @@ -88,7 +90,7 @@ Timespan BuildingType::get_build_time() const { return build_time; } -BuildingManager::BuildingManager() : building_types{ "building types" } {} +BuildingManager::BuildingManager() : building_types { "building types" } {} return_t BuildingManager::add_building_type(std::string const& identifier, Building::level_t max_level, Timespan build_time) { if (identifier.empty()) { |