1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

- Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets

This commit is contained in:
beegee1
2013-04-09 14:31:36 +00:00
parent 30bcec42c6
commit c7c2686379
62 changed files with 719 additions and 1025 deletions

View File

@@ -61,7 +61,7 @@ int CCallback::selectionMade(int selection, int queryID)
ASSERT_IF_CALLED_WITH_PLAYER
if(queryID == -1)
{
tlog1 << "Cannot answer the query -1!\n";
logGlobal->errorStream() << "Cannot answer the query -1!";
return false;
}
@@ -98,7 +98,7 @@ bool CCallback::upgradeCreature(const CArmedInstance *obj, SlotID stackPos, Crea
void CCallback::endTurn()
{
tlog5 << "Player " << *player << " ended his turn." << std::endl;
logGlobal->traceStream() << "Player " << *player << " ended his turn.";
EndTurn pack;
sendRequest(&pack); //report that we ended turn
}
@@ -190,7 +190,7 @@ int CBattleCallback::sendRequest(const CPack *request)
int requestID = cl->sendRequest(request, *player);
if(waitTillRealize)
{
tlog5 << boost::format("We'll wait till request %d is answered.\n") % requestID;
logGlobal->traceStream() << boost::format("We'll wait till request %d is answered.\n") % requestID;
auto gsUnlocker = vstd::makeUnlockSharedGuardIf(getGsMutex(), unlockGsWhenWaiting);
cl->waitingRequest.waitWhileContains(requestID);
}
@@ -390,4 +390,4 @@ bool CBattleCallback::battleMakeTacticAction( BattleAction * action )
ma.ba = *action;
sendRequest(&ma);
return true;
}
}