summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-05-16 10:16:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-05-17 08:22:14 +0200
commit7ab34b51f2d45137191145d31b4b0c7d18f577bf (patch)
treeabb760e86740a0e073008047d966af250e8c8c5d /libreofficekit
parentf8e3ad02737854686a590f7f8f02eb72e03a0f8e (diff)
loplugin:redundantcast improvements for floating-integer conversions
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/tilebench/tilebench.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index 3c62e2e36838..8bb41999f17c 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -155,7 +155,7 @@ int main( int argc, char* argv[] )
// Estimate the maximum tiles based on the number of parts requested, if Writer.
if (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT)
- max_tiles = static_cast<int>(ceil(max_parts * 16128. / nTilePixelHeight)) * ceil(static_cast<double>(nWidth) / nTilePixelWidth);
+ max_tiles = static_cast<int>(ceil(max_parts * 16128. / nTilePixelHeight) * ceil(static_cast<double>(nWidth) / nTilePixelWidth));
fprintf(stderr, "Parts to render: %d, Total Parts: %d, Max parts: %d, Max tiles: %d\n", nParts, nTotalParts, max_parts, max_tiles);
std::vector<unsigned char> vBuffer(nTilePixelWidth * nTilePixelHeight * 4);
@@ -210,7 +210,7 @@ int main( int argc, char* argv[] )
aTimes.emplace_back("render sub-regions at scale");
int nMaxTiles = max_tiles;
if (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT)
- nMaxTiles = static_cast<int>(ceil(max_parts * 16128. / nTileTwipHeight)) * ceil(static_cast<double>(nWidth) / nTileTwipWidth);
+ nMaxTiles = static_cast<int>(ceil(max_parts * 16128. / nTileTwipHeight) * ceil(static_cast<double>(nWidth) / nTileTwipWidth));
int nTiles = 0;
for (int nY = 0; nY < nHeight - 1; nY += nTileTwipHeight)
{