1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Fix indentation of logging code and around it

That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
This commit is contained in:
Arseniy Shestakov
2016-03-12 04:41:27 +03:00
parent faae305ec0
commit 10dbbead2d
54 changed files with 580 additions and 577 deletions

View File

@ -733,7 +733,7 @@ void CBattleInterface::setBattleCursor(const int myNumber)
// Generally should NEVER happen, but to avoid the possibility of having endless loop below... [#1016]
if(!vstd::contains_if(sectorCursor, [](int sc) { return sc != -1; }))
{
logGlobal->errorStream() << "Error: for hex " << myNumber << " cannot find a hex to attack from!";
logGlobal->errorStream() << "Error: for hex " << myNumber << " cannot find a hex to attack from!";
attackingHex = -1;
return;
}
@ -758,11 +758,11 @@ void CBattleInterface::setBattleCursor(const int myNumber)
break;
case 3:
attackingHex = myNumber + 1; //right
break;
break;
case 4:
attackingHex = myNumber + GameConstants::BFIELD_WIDTH + zigzagCorrection; //bottom right
break;
case 5:
break;
case 5:
attackingHex = myNumber + GameConstants::BFIELD_WIDTH - 1 + zigzagCorrection; //bottom left
break;
}
@ -1109,7 +1109,7 @@ void CBattleInterface::giveCommand(Battle::ActionType action, BattleHex tile, ui
}
if(stack && stack != activeStack)
logGlobal->warnStream() << "Warning: giving an order to a non-active stack?";
logGlobal->warnStream() << "Warning: giving an order to a non-active stack?";
auto ba = new BattleAction(); //is deleted in CPlayerInterface::activeStack()
ba->side = defendingHeroInstance ? (curInt->playerID == defendingHeroInstance->tempOwner) : false;
@ -1133,7 +1133,7 @@ void CBattleInterface::giveCommand(Battle::ActionType action, BattleHex tile, ui
if(!tacticsMode)
{
logGlobal->traceStream() << "Setting command for " << (stack ? stack->nodeName() : "hero");
logGlobal->traceStream() << "Setting command for " << (stack ? stack->nodeName() : "hero");
myTurn = false;
setActiveStack(nullptr);
givenCommand->setn(ba);
@ -1869,7 +1869,7 @@ void CBattleInterface::startAction(const BattleAction* action)
}
if(!stack)
{
logGlobal->errorStream()<<"Something wrong with stackNumber in actionStarted. Stack number: "<<action->stackNumber;
logGlobal->errorStream()<<"Something wrong with stackNumber in actionStarted. Stack number: "<<action->stackNumber;
return;
}
@ -2713,13 +2713,13 @@ void CBattleInterface::obstaclePlaced(const CObstacleInstance & oi)
sound = soundBase::fireWall;
break;
default:
logGlobal->errorStream() << "I don't know how to animate appearing obstacle of type " << (int)oi.obstacleType;
logGlobal->errorStream() << "I don't know how to animate appearing obstacle of type " << (int)oi.obstacleType;
return;
}
if(graphics->battleACToDef[effectID].empty())
{
logGlobal->errorStream() << "Cannot find def for effect type " << effectID;
logGlobal->errorStream() << "Cannot find def for effect type " << effectID;
return;
}