1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Finished conversion to new logging API

* removed logger streams
* (float3|int3)::operator() -> (float3|int3)::toString(), it was too ugly and confusing.
This commit is contained in:
AlexVinS
2017-08-11 20:03:05 +03:00
parent f2de6d1122
commit 15138c23de
85 changed files with 543 additions and 669 deletions

View File

@@ -45,7 +45,7 @@ bool CCreatureSet::setCreature(SlotID slot, CreatureID type, TQuantity quantity)
{
if(!slot.validSlot())
{
logGlobal->errorStream() << "Cannot set slot " << slot;
logGlobal->error("Cannot set slot %d", slot.getNum());
return false;
}
if(!quantity)
@@ -189,7 +189,7 @@ void CCreatureSet::addToSlot(SlotID slot, CStackInstance *stack, bool allowMergi
}
else
{
logGlobal->errorStream() << "Cannot add to slot " << slot << " stack " << *stack;
logGlobal->error("Cannot add to slot %d stack %s", slot.getNum(), stack->nodeName());
}
}
@@ -906,20 +906,6 @@ void CStackBasicDescriptor::serializeJson(JsonSerializeFormat & handler)
}
}
DLL_LINKAGE std::ostream & operator<<(std::ostream & str, const CStackInstance & sth)
{
if(!sth.valid(true))
str << "an invalid stack!";
str << "stack with " << sth.count << " of ";
if(sth.type)
str << sth.type->namePl;
else
str << sth.idRand;
return str;
}
void CSimpleArmy::clear()
{
army.clear();