1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fix issues reported by Sonar, review fixes

This commit is contained in:
Ivan Savenko
2025-04-21 18:41:01 +03:00
parent f3a57f754c
commit 4e8e85e3e4
26 changed files with 94 additions and 107 deletions

View File

@@ -379,7 +379,6 @@ void CGameStateCampaign::replaceHeroesPlaceholders()
if(heroPlaceholder->tempOwner.isValidPlayer())
heroToPlace->tempOwner = heroPlaceholder->tempOwner;
// FIXME: consider whether to move these actions to CMap::replaceObject method
heroToPlace->setAnchorPos(heroPlaceholder->anchorPos());
heroToPlace->setHeroType(heroToPlace->getHeroTypeID());
heroToPlace->appearance = heroToPlace->getObjectHandler()->getTemplates().front();
@@ -436,9 +435,6 @@ void CGameStateCampaign::transferMissingArtifacts(const CampaignTravel & travelO
else
logGlobal->error("Cannot transfer artifact - no receiver hero!");
}
// FIXME: erase entry from array? clear entire campaignHeroReplacements?
//campaignHeroReplacement.hero.reset();
}
}