1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +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

@ -86,6 +86,19 @@ bool Res::canAfford(const ResourceSet &res, const ResourceSet &price)
return true;
}
std::string Res::ResourceSet::toString() const
{
std::ostringstream out;
out << "[";
for(auto it = begin(); it != end(); ++it)
{
out << *it;
if(std::prev(end()) != it) out << ", ";
}
out << "]";
return out.str();
}
bool Res::ResourceSet::nziterator::valid()
{
return cur.resType < GameConstants::RESOURCE_QUANTITY && cur.resVal;