1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Remove custom casts

This commit is contained in:
Ivan Savenko
2024-02-14 12:56:37 +02:00
parent 0d74959a33
commit c23953eac5
14 changed files with 18 additions and 36 deletions

View File

@@ -170,7 +170,7 @@ void ApplyGhNetPackVisitor::visitTradeOnMarketplace(TradeOnMarketplace & pack)
{
const CGObjectInstance * object = gh.getObj(pack.marketId);
const CGHeroInstance * hero = gh.getHero(pack.heroId);
const IMarket * market = IMarket::castFrom(object);
const auto * market = dynamic_cast<const IMarket*>(object);
gh.throwIfWrongPlayer(&pack);