mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
- vcmi can be compiled with clang-3.1
This commit is contained in:
2
Global.h
2
Global.h
@ -118,7 +118,7 @@ typedef boost::int8_t si8; //signed int 8 bits (1 byte)
|
||||
//defining available c++11 features
|
||||
|
||||
//initialization lists - only gcc-4.4 or later
|
||||
#if defined(__GNUC__) && (GCC_VERSION >= 404)
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (GCC_VERSION >= 404))
|
||||
#define CPP11_USE_INITIALIZERS_LIST
|
||||
#endif
|
||||
|
||||
|
@ -993,7 +993,7 @@ bool CSpellEffectAnimation::init()
|
||||
|
||||
switch (effect)
|
||||
{
|
||||
case -1:
|
||||
case ui32(-1):
|
||||
be.x = x;
|
||||
be.y = y;
|
||||
break;
|
||||
|
@ -2098,7 +2098,7 @@ void CBattleInterface::getPossibleActionsForStack(const CStack * stack)
|
||||
possibleActions.push_back(ATTACK); //all active stacks can attack
|
||||
possibleActions.push_back(WALK_AND_ATTACK); //not all stacks can always walk, but we will check this elsewhere
|
||||
|
||||
if (stack->canMove() && stack->Speed()); //probably no reason to try move war machines or bound stacks
|
||||
if (stack->canMove() && stack->Speed()) //probably no reason to try move war machines or bound stacks
|
||||
possibleActions.push_back (MOVE_STACK); //all active stacks can attack
|
||||
|
||||
if (siegeH && stack->hasBonusOfType (Bonus::CATAPULT)) //TODO: check shots
|
||||
|
@ -336,7 +336,7 @@ void CCreatureWindow::init(const CStackInstance *Stack, const CBonusSystemNode *
|
||||
}
|
||||
file += sufix += ".bmp";
|
||||
|
||||
auto skillGraphics = new CPicture(file, 37 + i * 84, 224);
|
||||
new CPicture(file, 37 + i * 84, 224);
|
||||
}
|
||||
}
|
||||
//print commander level
|
||||
|
@ -1010,7 +1010,7 @@ startWalking:
|
||||
BattleHex hex = path.first[v];
|
||||
tiles.push_back(hex);
|
||||
|
||||
if(obstacle = battleGetObstacleOnPos(hex, false))
|
||||
if((obstacle = battleGetObstacleOnPos(hex, false)))
|
||||
{
|
||||
//we walked onto something, so we finalize this portion of stack movement check into obstacle
|
||||
break;
|
||||
@ -4518,7 +4518,7 @@ void CGameHandler::stackTurnTrigger(const CStack * st)
|
||||
{
|
||||
int index = rand() % bl.size();
|
||||
int spellID = bl[index]->subtype; //spell ID
|
||||
if (gs->curB->battleCanCastThisSpell(st->owner, VLC->spellh->spells[spellID], ECastingMode::ENCHANTER_CASTING)); //TODO: select another?
|
||||
if (gs->curB->battleCanCastThisSpell(st->owner, VLC->spellh->spells[spellID], ECastingMode::ENCHANTER_CASTING)) //TODO: select another?
|
||||
{
|
||||
int spellLeveL = bl[index]->val; //spell level
|
||||
const CGHeroInstance * enemyHero = gs->curB->getHero(gs->curB->theOtherPlayer(st->owner));
|
||||
|
Reference in New Issue
Block a user