1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Code refactor following C++ standard and condition fixes

This commit is contained in:
lainon
2022-11-15 03:20:55 +03:00
parent ae1d2c50e2
commit 7fdad4e0f6
27 changed files with 48 additions and 47 deletions

View File

@ -532,7 +532,7 @@ std::pair<Obj,int> CGameState::pickObject (CGObjectInstance *obj)
if (auto info = dynamic_cast<CCreGenAsCastleInfo*>(dwl->info))
{
faction = getRandomGenerator().nextInt((int)VLC->townh->size() - 1);
if(info->asCastle && info->instanceId != "")
if(info->asCastle && !info->instanceId.empty())
{
auto iter = map->instanceNames.find(info->instanceId);