mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
Merge branch 'resource' of https://github.com/Laserlicht/vcmi into resource
This commit is contained in:
@@ -124,7 +124,7 @@ std::string ResourceSet::toString() const
|
||||
|
||||
bool ResourceSet::nziterator::valid() const
|
||||
{
|
||||
return cur.resType < GameResID::COUNT && cur.resVal;
|
||||
return static_cast<int>(cur.resType) < LIBRARY->resourceTypeHandler->getAllObjects().size() && cur.resVal;
|
||||
}
|
||||
|
||||
ResourceSet::nziterator ResourceSet::nziterator::operator++()
|
||||
@@ -155,9 +155,9 @@ void ResourceSet::nziterator::advance()
|
||||
do
|
||||
{
|
||||
++cur.resType;
|
||||
} while(cur.resType < GameResID::COUNT && !(cur.resVal=rs[cur.resType]));
|
||||
} while(static_cast<int>(cur.resType) < LIBRARY->resourceTypeHandler->getAllObjects().size() && !(cur.resVal=rs[cur.resType]));
|
||||
|
||||
if(cur.resType >= GameResID::COUNT)
|
||||
if(static_cast<int>(cur.resType) >= LIBRARY->resourceTypeHandler->getAllObjects().size())
|
||||
cur.resVal = -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user