mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Compile issue fixed - it's temporary solution.
This commit is contained in:
@@ -535,7 +535,7 @@ void CMapHandler::terrainRect( int3 top_tile, unsigned char anim, const std::vec
|
|||||||
static const int notBlittedInPuzzleMode[] = {124};
|
static const int notBlittedInPuzzleMode[] = {124};
|
||||||
|
|
||||||
//don't print flaggable objects in puzzle mode
|
//don't print flaggable objects in puzzle mode
|
||||||
if(puzzleMode && (obj->isVisitable() || vstd::contains(notBlittedInPuzzleMode, obj->ID)))
|
if(puzzleMode && (obj->isVisitable() || std::find(notBlittedInPuzzleMode, notBlittedInPuzzleMode+1, obj->ID) != notBlittedInPuzzleMode+1)) //?
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SDL_Rect sr2(sr);
|
SDL_Rect sr2(sr);
|
||||||
|
2
global.h
2
global.h
@@ -431,7 +431,7 @@ namespace vstd
|
|||||||
template <typename Item, size_t N>
|
template <typename Item, size_t N>
|
||||||
bool contains(const Item (&c)[N], const Item &i) //returns true if given array contains item i
|
bool contains(const Item (&c)[N], const Item &i) //returns true if given array contains item i
|
||||||
{
|
{
|
||||||
return std::find(c, c+N, i) != c+N;
|
return std::find(c, c+N, i) != c+N; //TODO: find out why template is not resolved
|
||||||
}
|
}
|
||||||
template <typename Container1, typename Container2>
|
template <typename Container1, typename Container2>
|
||||||
typename Container2::iterator findFirstNot(Container1 &c1, Container2 &c2)//returns first element of c2 not present in c1
|
typename Container2::iterator findFirstNot(Container1 &c1, Container2 &c2)//returns first element of c2 not present in c1
|
||||||
|
Reference in New Issue
Block a user