mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fix some issues detected by Sonar & code review, fix build
This commit is contained in:
@@ -120,10 +120,9 @@ void MapController::repairMap(CMap * map)
|
||||
for(auto obj : allImpactedObjects)
|
||||
{
|
||||
//fix flags
|
||||
if(obj->getOwner() == PlayerColor::UNFLAGGABLE)
|
||||
if(obj->asOwnable() != nullptr && obj->getOwner() == PlayerColor::UNFLAGGABLE)
|
||||
{
|
||||
if(obj->asOwnable())
|
||||
obj->tempOwner = PlayerColor::NEUTRAL;
|
||||
obj->tempOwner = PlayerColor::NEUTRAL;
|
||||
}
|
||||
//fix hero instance
|
||||
if(auto * nih = dynamic_cast<CGHeroInstance*>(obj))
|
||||
|
||||
Reference in New Issue
Block a user