1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +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

@@ -58,7 +58,7 @@ namespace AIPathfinding
{
if(obj->ID != Obj::TOWN) //towns were handled in the previous loop
{
if(const IShipyard * shipyard = IShipyard::castFrom(obj))
if(const auto * shipyard = dynamic_cast<const IShipyard *>(obj))
shipyards.push_back(shipyard);
}
}