1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

MSVC: fixes for compatibility with latest Vcpkg packages

This commit is contained in:
Arseniy Shestakov 2018-08-27 22:19:11 +03:00
parent 47ba3b2476
commit edcaaf036a
3 changed files with 6 additions and 3 deletions

View File

@ -180,7 +180,7 @@ void foreach_neighbour(CCallback * cbp, const int3 & pos, std::function<void(CCa
}
}
bool CDistanceSorter::operator()(const CGObjectInstance * lhs, const CGObjectInstance * rhs)
bool CDistanceSorter::operator()(const CGObjectInstance * lhs, const CGObjectInstance * rhs) const
{
const CGPathNode * ln = ai->myCb->getPathsInfo(hero)->getPathInfo(lhs->visitablePos());
const CGPathNode * rn = ai->myCb->getPathsInfo(hero)->getPathInfo(rhs->visitablePos());

View File

@ -186,5 +186,5 @@ public:
: hero(hero)
{
}
bool operator()(const CGObjectInstance * lhs, const CGObjectInstance * rhs);
bool operator()(const CGObjectInstance * lhs, const CGObjectInstance * rhs) const;
};

View File

@ -154,6 +154,9 @@ if(WIN32)
# Reported to Microsoft here:
# https://developercommunity.visualstudio.com/content/problem/224597/linker-failing-because-of-multiple-definitions-of.html
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
# Required at least for compatibility with Boost 1.68 on Vcpkg
set(SYSTEM_LIBS ${SYSTEM_LIBS} bcrypt)
endif(MSVC)
if(MINGW)