the std::ceil inputs are already ints

So std::ceil isn't doing anything useful since:

commit dce6c18fb4
Date:   Thu Aug 30 17:40:42 2018 +0200

    Calculate tiles-on-fly limit a bit more precisely

Leave this case unchanged.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6d11c9b912facc26ad775fc916012b529ed5b0fa
This commit is contained in:
Caolán McNamara 2023-12-20 15:12:15 +00:00 committed by Michael Meeks
parent b1ff60ace3
commit 24a401c967

View file

@ -2363,10 +2363,10 @@ size_t ClientSession::getTilesOnFlyUpperLimit() const
float tilesOnFlyUpperLimit = 0;
if (normalizedVisArea.hasSurface() && getTileWidthInTwips() != 0 && getTileHeightInTwips() != 0)
{
const int tilesFitOnWidth = std::ceil(normalizedVisArea.getRight() / getTileWidthInTwips()) -
std::ceil(normalizedVisArea.getLeft() / getTileWidthInTwips()) + 1;
const int tilesFitOnHeight = std::ceil(normalizedVisArea.getBottom() / getTileHeightInTwips()) -
std::ceil(normalizedVisArea.getTop() / getTileHeightInTwips()) + 1;
const int tilesFitOnWidth = (normalizedVisArea.getRight() / getTileWidthInTwips()) -
(normalizedVisArea.getLeft() / getTileWidthInTwips()) + 1;
const int tilesFitOnHeight = (normalizedVisArea.getBottom() / getTileHeightInTwips()) -
(normalizedVisArea.getTop() / getTileHeightInTwips()) + 1;
const int tilesInVisArea = tilesFitOnWidth * tilesFitOnHeight;
tilesOnFlyUpperLimit = std::max(TILES_ON_FLY_MIN_UPPER_LIMIT, tilesInVisArea * 1.1f);