1
0
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:
Ivan Savenko
2012-08-26 13:16:57 +00:00
parent 002844b376
commit d5f29d134f
2 changed files with 2 additions and 5 deletions

View File

@@ -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;

View File

@@ -128,7 +128,7 @@ struct DLL_LINKAGE ReachabilityInfo
ReachabilityInfo()
{
distances.fill(INFINITE_DIST);
distances.fill(static_cast<int>(INFINITE_DIST));
predecessors.fill(BattleHex::INVALID);
}