File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,11 @@ void CK3::Character::initializeFromImperator(std::shared_ptr<Imperator::Characte
3737 if (provinceMapper.getCK3ProvinceNumbers (impProvForProvinceMapper).empty () && !imperatorCharacter->getSpouses ().empty ())
3838 impProvForProvinceMapper = imperatorCharacter->getSpouses ().begin ()->second ->getProvince ();
3939
40- if (provinceMapper.getCK3ProvinceNumbers (impProvForProvinceMapper).empty ())
40+ auto ck3ProvinceNumbers = provinceMapper.getCK3ProvinceNumbers (impProvForProvinceMapper);
41+ if (ck3ProvinceNumbers.empty ())
4142 ck3Province = 0 ;
4243 else
43- ck3Province = provinceMapper. getCK3ProvinceNumbers (impProvForProvinceMapper) [0 ];
44+ ck3Province = ck3ProvinceNumbers [0 ];
4445
4546 auto match = religionMapper.match (imperatorCharacter->getReligion (), ck3Province, imperatorCharacter->getProvince ());
4647 if (match)
Original file line number Diff line number Diff line change 77const std::string& Imperator::Character::getCulture () const {
88 if (!culture.empty ())
99 return culture;
10- if (family.first && !family.second ->getCulture ().empty ())
10+ if (family.first && family. second && !family.second ->getCulture ().empty ())
1111 return family.second ->getCulture ();
1212 return culture;
1313}
Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ void Imperator::Characters::linkFamilies(const Families& theFamilies) {
5252 }
5353 }
5454
55- std::string warningString = " Families without definition:" ;
55+ std::string logString = " Families without definition:" ;
5656 if (!idsWithoutDefinition.empty ()) {
5757 for (auto id : idsWithoutDefinition) {
58- warningString += " " ;
59- warningString += std::to_string (id);
60- warningString += " ," ;
58+ logString += " " ;
59+ logString += std::to_string (id);
60+ logString += " ," ;
6161 }
62- warningString = warningString .substr (0 , warningString .size () - 1 ); // remove last comma
63- Log (LogLevel::Warning ) << warningString ;
62+ logString = logString .substr (0 , logString .size () - 1 ); // remove last comma
63+ Log (LogLevel::Info ) << logString ;
6464 }
6565
6666 Log (LogLevel::Info) << " <> " << counter << " families linked to characters." ;
You can’t perform that action at this time.
0 commit comments