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

@@ -396,7 +396,7 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
for (auto armySlot : battle.battleGetArmyObject(loser)->stacks)
{
auto artifactsWorn = armySlot.second->artifactsWorn;
for(auto & artSlot : artifactsWorn)
for(const auto & artSlot : artifactsWorn)
{
MoveArtifact ma;
ma.src = ArtifactLocation(finishingBattle->loserHero->id, artSlot.first);

View File

@@ -17,20 +17,6 @@
#include "../../lib/networkPacks/PacksForServer.h"
#include "../../lib/serializer/Cast.h"
struct GetEngagedHeroIds
{
std::optional<ObjectInstanceID> operator()(const ConstTransitivePtr<CGHeroInstance> & h) const
{
return h->id;
}
std::optional<ObjectInstanceID> operator()(const ConstTransitivePtr<CStackInstance> & s) const
{
if(s->armyObj && s->armyObj->ID == Obj::HERO)
return s->armyObj->id;
return std::optional<ObjectInstanceID>();
}
};
TimerPauseQuery::TimerPauseQuery(CGameHandler * owner, PlayerColor player):
CQuery(owner)
{