1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +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

@@ -1407,7 +1407,9 @@ std::shared_ptr<CGObjectInstance> CMapLoaderH3M::readArtifact(const int3 & mapPo
logGlobal->warn("Map '%s': Artifact %s: not implemented pickup mode %d (flags: %d)", mapName, mapPosition.toString(), pickupMode, static_cast<int>(pickupFlags));
}
object->setArtifactInstance(map->createArtifact(artID, SpellID::NONE));
if (artID.hasValue())
object->setArtifactInstance(map->createArtifact(artID, SpellID::NONE));
// else - random, will be initialized later
return object;
}
@@ -1956,8 +1958,6 @@ void CMapLoaderH3M::readObjects()
map->generateUniqueInstanceName(newObject.get());
map->addNewObject(newObject);
}
map->postInitialize();
}
void CMapLoaderH3M::readCreatureSet(CArmedInstance * out, const ObjectInstanceID & idToBeGiven)