aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/ProvinceHistory.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-10-30 18:43:19 +0100
committer GitHub <noreply@github.com>2023-10-30 18:43:19 +0100
commit1603fbafb1c03830f38fefd87d8bd0d7d3f135a2 (patch)
tree5f69b6b64292cca76be1ab113a09345713db059b /src/openvic-simulation/history/ProvinceHistory.hpp
parent06cc0606156d009026930c785c62434276fbe782 (diff)
parentaac85aeb4583c292966567ac120658f71fefd9b4 (diff)
Merge pull request #69 from OpenVicProject/province-history-optionals
Make `add_province_history_entry` use optionals
Diffstat (limited to 'src/openvic-simulation/history/ProvinceHistory.hpp')
-rw-r--r--src/openvic-simulation/history/ProvinceHistory.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/openvic-simulation/history/ProvinceHistory.hpp b/src/openvic-simulation/history/ProvinceHistory.hpp
index 00ce212..42dacbf 100644
--- a/src/openvic-simulation/history/ProvinceHistory.hpp
+++ b/src/openvic-simulation/history/ProvinceHistory.hpp
@@ -63,12 +63,13 @@ namespace OpenVic {
ProvinceHistoryManager() {}
bool add_province_history_entry(
- Province const* province, Date date, Country const* owner, Country const* controller, uint8_t colonial, bool slave,
+ Province const* province, Date date, Country const* owner, Country const* controller,
+ std::optional<uint8_t>&& colonial, std::optional<bool>&& slave,
std::vector<Country const*>&& cores, // additive to existing entries
std::vector<Country const*>&& remove_cores, // existing cores that need to be removed
- Good const* rgo, uint8_t life_rating, TerrainType const* terrain_type,
- std::map<Building const*, uint8_t>&& buildings, std::map<Ideology const*, uint8_t>&& party_loyalties,
- std::bitset<5> updates // bitmap of updated non-pointer values, top to bottom
+ Good const* rgo, std::optional<uint8_t>&& life_rating, TerrainType const* terrain_type,
+ std::optional<std::map<Building const*, uint8_t>>&& buildings,
+ std::optional<std::map<Ideology const*, uint8_t>>&& party_loyalties
);
void lock_province_histories();