mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
- create temporary when INFINITE_DIST passed by reference. Should work with MSVC as well :)
This commit is contained in:
@@ -8,9 +8,6 @@
|
||||
|
||||
#define RETURN_IF_NOT_BATTLE(X) if(!duringBattle()) {tlog1 << __FUNCTION__ << " called when no battle!\n"; return X; }
|
||||
|
||||
//allocate static member
|
||||
//const int ReachabilityInfo::INFINITE_DIST;
|
||||
|
||||
namespace SiegeStuffThatShouldBeMovedToHandlers // <=== TODO
|
||||
{
|
||||
static int lineToWallHex(int line) //returns hex with wall in given line (y coordinate)
|
||||
@@ -1089,7 +1086,7 @@ ReachabilityInfo CBattleInfoCallback::makeBFS(const AccessibilityInfo &accessibi
|
||||
ret.params = params;
|
||||
|
||||
ret.predecessors.fill(BattleHex::INVALID);
|
||||
ret.distances.fill(ReachabilityInfo::INFINITE_DIST);
|
||||
ret.distances.fill(static_cast<int>(ReachabilityInfo::INFINITE_DIST));
|
||||
|
||||
const std::set<BattleHex> quicksands = getStoppers(params.perspective);
|
||||
//const bool twoHexCreature = params.doubleWide;
|
||||
|
@@ -128,7 +128,7 @@ struct DLL_LINKAGE ReachabilityInfo
|
||||
|
||||
ReachabilityInfo()
|
||||
{
|
||||
distances.fill(INFINITE_DIST);
|
||||
distances.fill(static_cast<int>(INFINITE_DIST));
|
||||
predecessors.fill(BattleHex::INVALID);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user