1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

code review

This commit is contained in:
Laserlicht
2024-12-05 23:31:03 +01:00
parent 1fb5301750
commit 4b103fd63b
4 changed files with 21 additions and 12 deletions

View File

@ -125,7 +125,7 @@ std::shared_ptr<IImage> MapTileStorage::find(size_t fileIndex, size_t rotationIn
{
const auto & animation = animations[fileIndex][rotationIndex];
if (animation)
return animation->getImage(imageIndex, groupIndex); // ask for group
return animation->getImage(imageIndex, groupIndex);
else
return nullptr;
}
@ -134,7 +134,7 @@ int MapTileStorage::groupCount(size_t fileIndex, size_t rotationIndex, size_t im
{
const auto & animation = animations[fileIndex][rotationIndex];
if (animation)
for(int i = 0; true; i++)
for(int i = 0;; i++)
if(!animation->getImage(imageIndex, i, false))
return i;
return 1;