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:
@ -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;
|
||||
|
Reference in New Issue
Block a user