Repository: microsoft/terminal
File: src/renderer/atlas/AtlasEngine.h (C/C++)

Code before:
                    return _pos;
                }

                if (_cache.empty())
                {
                    map.popOldestTiles(_cache);
                }

                const auto pos = _cache.back();
                _cache.pop_back();
                return pos;
            }

        private:
            // This method generates the Z pattern coordinates
            // described above in the TileAllocator comment.
            bool _generate() noexcept
            {
                if (!_canGenerate)
                {
                    return false;
                }

                // We need to backup _pos/_size in case our resize below exceeds _maxArea.
                // In that case we have to restore _pos/_size so that if _maxArea is increased
                // (window resize for instance), we can pick up were we previously left off.
                const auto pos = _pos;

                _pos.x += _tileSize.x;
                if (_pos.x <= _limit.x)
                {
                    return true;
                }

                _pos.y += _tileSize.y;
                if (_pos.y <= _limit.y)
                {
                    _pos.x = _originX;
                    return true;
                }

                // Same as for pos.
                const auto size = _size;

                // This implements a quadratic growth factor for _size, by
                // alternating between an 1:1 and 2:1 aspect ratio, like so:
                //   (64,64) -> (128,64) -> (128,128) -> (256,128) -> (256,256)
                // This behavior is strictly dependent on setMaxArea(u16x2)'s
                // behavior. See it's comment for an explanation.
                if (_size.x == _size.y)
                {

Review comment (suggestion):
```suggestion
                // (window resize for instance), we can pick up where we previously left off.
```

Code after:
                    return _pos;
                }

                if (_cache.empty())
                {
                    map.popOldestTiles(_cache);
                }

                const auto pos = _cache.back();
                _cache.pop_back();
                return pos;
            }

        private:
            // This method generates the Z pattern coordinates
            // described above in the TileAllocator comment.
            bool _generate() noexcept
            {
                if (!_canGenerate)
                {
                    return false;
                }

                // We need to backup _pos/_size in case our resize below exceeds _maxArea.
                // In that case we have to restore _pos/_size so that if _maxArea is increased
                // (window resize for instance), we can pick up where we previously left off.
                const auto pos = _pos;

                _pos.x += _tileSize.x;
                if (_pos.x <= _limit.x)
                {
                    return true;
                }

                _pos.y += _tileSize.y;
                if (_pos.y <= _limit.y)
                {
                    _pos.x = _originX;
                    return true;
                }

                // Same as for pos.
                const auto size = _size;

                // This implements a quadratic growth factor for _size, by
                // alternating between an 1:1 and 2:1 aspect ratio, like so:
                //   (64,64) -> (128,64) -> (128,128) -> (256,128) -> (256,256)
                // This behavior is strictly dependent on setMaxArea(u16x2)'s
                // behavior. See it's comment for an explanation.
                if (_size.x == _size.y)
                {