1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Removed ConstTransitivePtr from StackLocation

This commit is contained in:
Ivan Savenko
2025-03-03 14:08:33 +00:00
parent a061ed04de
commit 82506d5eff
12 changed files with 119 additions and 116 deletions

View File

@@ -420,7 +420,7 @@ void CGDwelling::heroAcceptsCreatures( const CGHeroInstance *h) const
std::pair<SlotID, SlotID> toMerge;
if (h->mergeableStacks(toMerge))
{
cb->moveStack(StackLocation(h, toMerge.first), StackLocation(h, toMerge.second), -1); //merge toMerge.first into toMerge.second
cb->moveStack(StackLocation(h->id, toMerge.first), StackLocation(h->id, toMerge.second), -1); //merge toMerge.first into toMerge.second
assert(!h->hasStackAtSlot(toMerge.first)); //we have now a new free slot
}
}
@@ -453,7 +453,7 @@ void CGDwelling::heroAcceptsCreatures( const CGHeroInstance *h) const
cb->showInfoDialog(&iw);
cb->sendAndApply(sac);
cb->addToSlot(StackLocation(h, slot), crs, count);
cb->addToSlot(StackLocation(h->id, slot), crs, count);
}
}
else //there no creatures