Skip to content

Commit cf42335

Browse files
committed
Improve code quality, applied from #2437
1 parent f52b8a4 commit cf42335

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/2d/FastTMXLayer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,9 @@ int FastTMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags /
690690

691691
// Bits on the far end of the 32-bit global tile ID are used for tile flags
692692
int tile = _tiles[idx];
693-
auto it = _spriteContainer.find(idx);
694-
693+
decltype(_spriteContainer)::iterator it;
695694
// converted to sprite.
696-
if (tile == 0 && it != _spriteContainer.end())
695+
if (tile == 0 && (it = _spriteContainer.find(idx)) != _spriteContainer.end())
697696
{
698697
tile = it->second.second;
699698
}

0 commit comments

Comments
 (0)