mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Reduce usage of implicit conversions to int
This commit is contained in:
@ -315,14 +315,14 @@ void PlayerLocalState::serialize(JsonNode & dest) const
|
||||
for (auto const * town : ownedTowns)
|
||||
{
|
||||
JsonNode record;
|
||||
record["id"].Integer() = town->id;
|
||||
record["id"].Integer() = town->id.getNum();
|
||||
dest["towns"].Vector().push_back(record);
|
||||
}
|
||||
|
||||
for (auto const * hero : wanderingHeroes)
|
||||
{
|
||||
JsonNode record;
|
||||
record["id"].Integer() = hero->id;
|
||||
record["id"].Integer() = hero->id.getNum();
|
||||
if (vstd::contains(sleepingHeroes, hero))
|
||||
record["sleeping"].Bool() = true;
|
||||
|
||||
@ -340,7 +340,7 @@ void PlayerLocalState::serialize(JsonNode & dest) const
|
||||
dest["spellbook"]["tabAdvmap"].Integer() = spellbookSettings.spellbookLastTabAdvmap;
|
||||
|
||||
if (currentSelection)
|
||||
dest["currentSelection"].Integer() = currentSelection->id;
|
||||
dest["currentSelection"].Integer() = currentSelection->id.getNum();
|
||||
}
|
||||
|
||||
void PlayerLocalState::deserialize(const JsonNode & source)
|
||||
|
Reference in New Issue
Block a user