diff options
author | hop311 <hop3114@gmail.com> | 2023-10-29 15:11:10 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-10-29 21:08:08 +0100 |
commit | 1b5e43fa7750cc4025d32f18390593cbce3ba842 (patch) | |
tree | d37fcb69766ec029ea4e3e2816c419f9d7e05f7c /src/openvic-simulation/map/Province.cpp | |
parent | 164264b047921dbe1567d2af183e1cffb200a8cb (diff) |
Clang-format formatting (with manual cleanup)
Diffstat (limited to 'src/openvic-simulation/map/Province.cpp')
-rw-r--r-- | src/openvic-simulation/map/Province.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/openvic-simulation/map/Province.cpp b/src/openvic-simulation/map/Province.cpp index 5a7625f..225d4c0 100644 --- a/src/openvic-simulation/map/Province.cpp +++ b/src/openvic-simulation/map/Province.cpp @@ -3,9 +3,10 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; -Province::Province(std::string_view new_identifier, colour_t new_colour, index_t new_index) - : HasIdentifierAndColour { new_identifier, new_colour, false, false }, - index { new_index }, buildings { "buildings", false } { +Province::Province( + std::string_view new_identifier, colour_t new_colour, index_t new_index +) : HasIdentifierAndColour { new_identifier, new_colour, false, false }, index { new_index }, + buildings { "buildings", false } { assert(index != NULL_INDEX); } @@ -93,8 +94,7 @@ std::string Province::to_string() const { } bool Province::load_pop_list(PopManager const& pop_manager, ast::NodeCPtr root) { - return expect_dictionary_reserve_length( - pops, + return expect_dictionary_reserve_length(pops, [this, &pop_manager](std::string_view pop_type_identifier, ast::NodeCPtr pop_node) -> bool { return pop_manager.load_pop_into_province(*this, pop_type_identifier, pop_node); } @@ -182,10 +182,11 @@ Province::flags_t Province::adjacency_t::get_flags() const { } bool Province::is_adjacent_to(Province const* province) { - for (adjacency_t adj : adjacencies) + for (adjacency_t adj : adjacencies) { if (adj.province == province) { return true; } + } return false; } |