1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +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

@ -173,7 +173,9 @@ SDL_Surface * BitmapHandler::loadBitmap(std::string fname, bool setKey)
if (!(bitmap = loadBitmapFromDir("DATA/", fname, setKey)) && if (!(bitmap = loadBitmapFromDir("DATA/", fname, setKey)) &&
!(bitmap = loadBitmapFromDir("SPRITES/", fname, setKey))) !(bitmap = loadBitmapFromDir("SPRITES/", fname, setKey)))
{
logGlobal->errorStream() << "Error: Failed to find file " << fname; logGlobal->errorStream() << "Error: Failed to find file " << fname;
}
return bitmap; return bitmap;
} }

View File

@ -331,8 +331,8 @@ void CClient::loadGame(const std::string & fname, const bool server, const std::
if(server) if(server)
{ {
for(auto & elem : gs->scenarioOps->playerInfos) for(auto & elem : gs->scenarioOps->playerInfos)
if(!std::count(humanplayerindices.begin(),humanplayerindices.end(),elem.first.getNum()) || elem.first==player)
{ {
if(!std::count(humanplayerindices.begin(),humanplayerindices.end(),elem.first.getNum()) || elem.first==player)
clientPlayers.insert(elem.first); clientPlayers.insert(elem.first);
} }
clientPlayers.insert(PlayerColor::NEUTRAL); clientPlayers.insert(PlayerColor::NEUTRAL);

View File

@ -1174,7 +1174,6 @@ void CAnimation::getAnimInfo()
logGlobal->errorStream() << "Animation stats: Loaded " << loadedAnims.size() << " total"; logGlobal->errorStream() << "Animation stats: Loaded " << loadedAnims.size() << " total";
for(auto anim : loadedAnims) for(auto anim : loadedAnims)
{ {
logGlobal->errorStream() << "Name: " << anim->name << " Groups: " << anim->images.size(); logGlobal->errorStream() << "Name: " << anim->name << " Groups: " << anim->images.size();
if(!anim->images.empty()) if(!anim->images.empty())
logGlobal->errorStream() << ", " << anim->images.begin()->second.size() << " image loaded in group " << anim->images.begin()->first; logGlobal->errorStream() << ", " << anim->images.begin()->second.size() << " image loaded in group " << anim->images.begin()->first;

View File

@ -2159,8 +2159,10 @@ bool AccessibilityInfo::accessible(BattleHex tile, bool doubleWide, bool attacke
// isn't accessible // isn't accessible
else if(at(hex) != EAccessibility::ACCESSIBLE && else if(at(hex) != EAccessibility::ACCESSIBLE &&
!(at(hex) == EAccessibility::GATE && !attackerOwned)) !(at(hex) == EAccessibility::GATE && !attackerOwned))
{
return false; return false;
} }
}
return true; return true;
} }

View File

@ -6134,7 +6134,7 @@ CasualtiesAfterBattle::CasualtiesAfterBattle(const CArmedInstance * _army, Battl
{ {
if(st->alive() && st->count > 0) if(st->alive() && st->count > 0)
{ {
logGlobal->debugStream() << "Permanently summoned " + st->count << " units."; logGlobal->debugStream() << "Permanently summoned " << st->count << " units.";
const CreatureID summonedType = st->type->idNumber; const CreatureID summonedType = st->type->idNumber;
summoned[summonedType] += st->count; summoned[summonedType] += st->count;
} }