1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-07 23:33:15 +02:00

Fixed lots of warnings.

Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed.

4003: not enough actual parameters for macro 'identifier'
4250: 'class1' : inherits 'class2::member' via dominance
4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2'
4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
This commit is contained in:
John Bolton
2020-10-01 01:38:06 -07:00
parent ff471af3de
commit a05ae78e67
142 changed files with 854 additions and 839 deletions

View File

@@ -71,7 +71,7 @@ DLL_LINKAGE void SetCommanderProperty::applyGs(CGameState *gs)
commander->specialSKills.insert (additionalInfo);
break;
case SECONDARY_SKILL:
commander->secondarySkills[additionalInfo] = amount;
commander->secondarySkills[additionalInfo] = static_cast<ui8>(amount);
break;
case ALIVE:
if (amount)
@@ -635,7 +635,7 @@ DLL_LINKAGE void HeroRecruited::applyGs(CGameState *gs)
gs->hpool.heroesPool.erase(hid);
if(h->id == ObjectInstanceID())
{
h->id = ObjectInstanceID(gs->map->objects.size());
h->id = ObjectInstanceID((si32)gs->map->objects.size());
gs->map->objects.push_back(h);
}
else
@@ -721,7 +721,7 @@ DLL_LINKAGE void NewObject::applyGs(CGameState *gs)
o->subID = subID;
o->pos = pos;
o->appearance = VLC->objtypeh->getHandlerFor(o->ID, o->subID)->getTemplates(terrainType).front();
id = o->id = ObjectInstanceID(gs->map->objects.size());
id = o->id = ObjectInstanceID((si32)gs->map->objects.size());
gs->map->objects.push_back(o);
gs->map->addBlockVisTiles(o);