1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

fix test & fix build & suggested changes

This commit is contained in:
SoundSSGood
2023-10-24 17:32:09 +03:00
parent c2f658d638
commit 7e6ab5e87b
5 changed files with 6 additions and 19 deletions

View File

@@ -693,7 +693,7 @@ void CArtHandler::makeItCommanderArt(CArtifact * a, bool onlyCommander)
a->possibleSlots[ArtBearer::HERO].clear();
a->possibleSlots[ArtBearer::CREATURE].clear();
}
for(auto & slot : ArtifactUtils::commanderSlots())
for(const auto & slot : ArtifactUtils::commanderSlots())
a->possibleSlots[ArtBearer::COMMANDER].push_back(ArtifactPosition(slot));
}
@@ -1080,7 +1080,7 @@ void CArtifactSet::serializeJsonArtifacts(JsonSerializeFormat & handler, const s
void CArtifactSet::serializeJsonHero(JsonSerializeFormat & handler, CMap * map)
{
for(auto & slot : ArtifactUtils::allWornSlots())
for(const auto & slot : ArtifactUtils::allWornSlots())
{
serializeJsonSlot(handler, slot, map);
}

View File

@@ -16,6 +16,7 @@
#include "gameState/TavernHeroesPool.h"
#include "gameState/QuestInfo.h"
#include "mapObjects/CGHeroInstance.h"
#include "networkPacks/ArtifactLocation.h"
#include "CGeneralTextHandler.h"
#include "StartInfo.h" // for StartInfo
#include "battle/BattleInfo.h" // for BattleInfo