summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2018-10-31 17:20:46 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-11-01 13:02:26 +0100
commit26ccd00bc96c585b7065af0dcce246b5bfaae5e1 (patch)
tree960e163c0041c813e10f567995d648dc9332449d /libreofficekit
parent0610c4439edf95b4cc4e16ee625b60ba606f7528 (diff)
clang-tidy: (WIP) bugprone-too-small-loop-variable findings
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/tilebench/tilebench.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index 8f1a2f793494..61d337f6c518 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -178,9 +178,9 @@ static void testTile( Document *pDocument, int max_parts,
// Estimate the maximum tiles based on the number of parts requested, if Writer.
int nMaxTiles = max_tiles;
int nTiles = 0;
- for (int nY = 0; nY < nHeight - 1; nY += nTilePixelHeight)
+ for (long nY = 0; nY < nHeight - 1; nY += nTilePixelHeight)
{
- for (int nX = 0; nX < nWidth - 1; nX += nTilePixelWidth)
+ for (long nX = 0; nX < nWidth - 1; nX += nTilePixelWidth)
{
if (nMaxTiles >= 0 && nTiles >= nMaxTiles)
{
@@ -190,7 +190,7 @@ static void testTile( Document *pDocument, int max_parts,
pDocument->paintTile(pPixels, nTilePixelWidth, nTilePixelHeight,
nX, nY, nTilePixelWidth, nTilePixelHeight);
nTiles++;
- fprintf (stderr, " rendered 1:1 tile %d at %d, %d\n",
+ fprintf (stderr, " rendered 1:1 tile %d at %ld, %ld\n",
nTiles, nX, nY);
}
}
@@ -203,9 +203,9 @@ static void testTile( Document *pDocument, int max_parts,
if (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT)
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)
+ for (long nY = 0; nY < nHeight - 1; nY += nTileTwipHeight)
{
- for (int nX = 0; nX < nWidth - 1; nX += nTileTwipWidth)
+ for (long nX = 0; nX < nWidth - 1; nX += nTileTwipWidth)
{
if (nMaxTiles >= 0 && nTiles >= nMaxTiles)
{
@@ -215,7 +215,7 @@ static void testTile( Document *pDocument, int max_parts,
pDocument->paintTile(pPixels, nTilePixelWidth, nTilePixelHeight,
nX, nY, nTileTwipWidth, nTileTwipHeight);
nTiles++;
- fprintf (stderr, " rendered scaled tile %d at %d, %d\n",
+ fprintf (stderr, " rendered scaled tile %d at %ld, %ld\n",
nTiles, nX, nY);
}
}