summaryrefslogtreecommitdiff
path: root/src/openvic/map/Building.cpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-05-22 11:26:37 +0200
committer Hop311 <hop3114@gmail.com>2023-05-22 11:26:37 +0200
commit212d591c31f4200b06d38e98b23c5c2bccde1772 (patch)
tree6a9964038de099006036c693b49080bf544d3747 /src/openvic/map/Building.cpp
parent15e960f93ced8c94a6a45ebb2b44d0705ff7f8f6 (diff)
Formatting / style cleanup
Diffstat (limited to 'src/openvic/map/Building.cpp')
-rw-r--r--src/openvic/map/Building.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/openvic/map/Building.cpp b/src/openvic/map/Building.cpp
index ccd5ad7..1513e06 100644
--- a/src/openvic/map/Building.cpp
+++ b/src/openvic/map/Building.cpp
@@ -7,7 +7,9 @@
using namespace OpenVic;
-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 +76,10 @@ 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(max_level >= 0);
assert(build_time >= 0);
}
@@ -88,7 +92,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()) {