diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/religion/holy_sites/CONVERTER_holy_sites.txt b/ImperatorToCK3/Data_Files/blankMod/output/common/religion/holy_sites/CONVERTER_holy_sites.txt index 2d831a5b6..5af715197 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/religion/holy_sites/CONVERTER_holy_sites.txt +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/religion/holy_sites/CONVERTER_holy_sites.txt @@ -1,4 +1,4 @@ -#Druidic +#Druidic ynys_mon = { #toutatis county = c_anglesey barony = b_yns_mon diff --git a/ImperatorToCK3/Data_Files/blankMod/output/common/religion/religions/00_kushitism.txt b/ImperatorToCK3/Data_Files/blankMod/output/common/religion/religions/00_kushitism.txt index 843803921..88e5c5a9d 100644 --- a/ImperatorToCK3/Data_Files/blankMod/output/common/religion/religions/00_kushitism.txt +++ b/ImperatorToCK3/Data_Files/blankMod/output/common/religion/religions/00_kushitism.txt @@ -1,4 +1,4 @@ - + kushitism_religion = { family = rf_pagan diff --git a/ImperatorToCK3/Source/CK3/Dynasties/Dynasty.cpp b/ImperatorToCK3/Source/CK3/Dynasties/Dynasty.cpp index 338e60f7b..8fc0de08e 100644 --- a/ImperatorToCK3/Source/CK3/Dynasties/Dynasty.cpp +++ b/ImperatorToCK3/Source/CK3/Dynasties/Dynasty.cpp @@ -3,6 +3,7 @@ #include "Imperator/Families/Family.h" #include "Imperator/Characters/Character.h" #include "Log.h" +#include @@ -17,7 +18,7 @@ CK3::Dynasty::Dynasty(const Imperator::Family& impFamily, const mappers::Localiz Log(LogLevel::Warning) << "Couldn't determine culture for dynasty " << ID << ", needs manual setting!"; } - for (const auto& [memberID, member] : impMembers) { + for (const auto& member : impMembers | std::views::values) { if (const auto& ck3Member = member->getCK3Character()) { ck3Member->setDynastyID(ID); } diff --git a/ImperatorToCK3/Source/CK3/Province/CK3Province.h b/ImperatorToCK3/Source/CK3/Province/CK3Province.h index ed8dfa24d..5eaefe3d5 100644 --- a/ImperatorToCK3/Source/CK3/Province/CK3Province.h +++ b/ImperatorToCK3/Source/CK3/Province/CK3Province.h @@ -23,12 +23,12 @@ namespace CK3 { class Title; class Province { - public: +public: Province() = default; Province(unsigned long long id, std::istream& theStream); Province(unsigned long long id, const Province& otherProv); - void initializeFromImperator(const std::shared_ptr& origProvince, + void initializeFromImperator(const std::shared_ptr& impProvince, const mappers::CultureMapper& cultureMapper, const mappers::ReligionMapper& religionMapper); @@ -44,7 +44,7 @@ class Province { friend std::ostream& operator<<(std::ostream& output, const Province& province); - private: +private: void setReligionFromImperator(const mappers::ReligionMapper& religionMapper); void setCultureFromImperator(const mappers::CultureMapper& cultureMapper); void setHoldingFromImperator(); diff --git a/ImperatorToCK3/Source/CommonUtilities/History.cpp b/ImperatorToCK3/Source/CommonUtilities/History.cpp index 464359ce6..f235ed05b 100644 --- a/ImperatorToCK3/Source/CommonUtilities/History.cpp +++ b/ImperatorToCK3/Source/CommonUtilities/History.cpp @@ -1,13 +1,11 @@ #include "ParserHelpers.h" -#include "CommonRegexes.h" #include "History.h" std::optional History::getFieldValue(const std::string& fieldName, const date& date) const { const auto itr = simpleFields.find(fieldName); - if (itr == simpleFields.end()) - { + if (itr == simpleFields.end()) { return std::nullopt; } diff --git a/ImperatorToCK3/Source/CommonUtilities/HistoryFactory.h b/ImperatorToCK3/Source/CommonUtilities/HistoryFactory.h index f07d24be4..5f585a806 100644 --- a/ImperatorToCK3/Source/CommonUtilities/HistoryFactory.h +++ b/ImperatorToCK3/Source/CommonUtilities/HistoryFactory.h @@ -14,7 +14,7 @@ class History::Factory: commonItems::parser { public: - explicit Factory(std::vector simpleFieldStructs); + explicit Factory(std::vector _simpleFieldStructs); std::unique_ptr getHistory(std::istream& theStream); private: diff --git a/ImperatorToCK3/Source/Imperator/Characters/Characters.cpp b/ImperatorToCK3/Source/Imperator/Characters/Characters.cpp index 008728ace..54e77b168 100644 --- a/ImperatorToCK3/Source/Imperator/Characters/Characters.cpp +++ b/ImperatorToCK3/Source/Imperator/Characters/Characters.cpp @@ -7,6 +7,7 @@ #include "CommonRegexes.h" #include #include +#include @@ -31,7 +32,7 @@ void Imperator::Characters::linkFamilies(const Families& theFamilies) { std::set idsWithoutDefinition; const auto& families = theFamilies.getFamilies(); - for (const auto& [characterID, character]: characters) { + for (const auto& character : characters | std::views::values) { auto familyID = character->getFamily().first; if (const auto& familyItr = families.find(familyID); familyItr != families.end()) { character->setFamily(familyItr->second); @@ -60,10 +61,10 @@ void Imperator::Characters::linkFamilies(const Families& theFamilies) { void Imperator::Characters::linkSpouses() { auto counterSpouse = 0; - for (const auto& [characterID, character]: characters) { + for (const auto& character : characters | std::views::values) { if (!character->getSpouses().empty()) { std::map> newSpouses; - for (const auto& [spouseID, spouse]: character->getSpouses()) { + for (const auto& spouseID : character->getSpouses() | std::views::keys) { const auto& characterItr = characters.find(spouseID); if (characterItr != characters.end()) { newSpouses.emplace(characterItr->first, characterItr->second); diff --git a/ImperatorToCK3/Source/Imperator/Countries/Countries.cpp b/ImperatorToCK3/Source/Imperator/Countries/Countries.cpp index 8a0120934..cbf6596b5 100644 --- a/ImperatorToCK3/Source/Imperator/Countries/Countries.cpp +++ b/ImperatorToCK3/Source/Imperator/Countries/Countries.cpp @@ -4,6 +4,7 @@ #include "Log.h" #include "ParserHelpers.h" #include "CommonRegexes.h" +#include @@ -40,10 +41,10 @@ void Imperator::Countries::linkFamilies(const Families& theFamilies) { auto counter = 0; std::set idsWithoutDefinition; const auto& families = theFamilies.getFamilies(); - for (const auto& [countryID, country] : countries) { + for (const auto& country : countries | std::views::values) { if (!country->getFamilies().empty()) { std::map> newFamilies; - for (const auto& [familyID, family] : country->getFamilies()) { + for (const auto& familyID : country->getFamilies() | std::views::keys) { const auto& familyItr = families.find(familyID); if (familyItr != families.end()) { newFamilies.insert(std::pair(familyItr->first, familyItr->second)); diff --git a/ImperatorToCK3/Source/Imperator/Families/Family.h b/ImperatorToCK3/Source/Imperator/Families/Family.h index 69485fa38..29d0bdaa0 100644 --- a/ImperatorToCK3/Source/Imperator/Families/Family.h +++ b/ImperatorToCK3/Source/Imperator/Families/Family.h @@ -16,7 +16,7 @@ class Family { class Factory; Family() = default; - void linkMember(const std::shared_ptr& memberPtr); + void linkMember(const std::shared_ptr& newMemberPtr); [[nodiscard]] auto getID() const { return ID; } [[nodiscard]] const auto& getKey() const { return key; } diff --git a/ImperatorToCK3/Source/Imperator/Provinces/Provinces.cpp b/ImperatorToCK3/Source/Imperator/Provinces/Provinces.cpp index 73618caea..26f121b20 100644 --- a/ImperatorToCK3/Source/Imperator/Provinces/Provinces.cpp +++ b/ImperatorToCK3/Source/Imperator/Provinces/Provinces.cpp @@ -6,6 +6,7 @@ #include "Log.h" #include "ParserHelpers.h" #include "CommonRegexes.h" +#include @@ -28,10 +29,10 @@ void Imperator::Provinces::registerKeys() { void Imperator::Provinces::linkPops(const Pops& thePops) { auto counter = 0; const auto& pops = thePops.getPops(); - for (const auto& [provinceID, province] : provinces) { + for (const auto& province : provinces | std::views::values) { if (!province->getPops().empty()) { std::map> newPops; - for (const auto& [popID, pop] : province->getPops()) { + for (const auto& popID : province->getPops() | std::views::keys) { const auto& popItr = pops.find(popID); if (popItr != pops.end()) { newPops.emplace(popItr->first, popItr->second); @@ -51,7 +52,7 @@ void Imperator::Provinces::linkPops(const Pops& thePops) { void Imperator::Provinces::linkCountries(const Countries& theCountries) { auto counter = 0; const auto& countries = theCountries.getCountries(); - for (const auto& [provinceID, province] : provinces) { + for (const auto& province : provinces | std::views::values) { if (!province->getPops().empty()) { const auto& countryItr = countries.find(province->getOwner().first); if (countryItr != countries.end()) {