From 0f166ef5240ee155bf2544e6bc3c985b1e3bf646 Mon Sep 17 00:00:00 2001 From: Gökhan Gurbetoğlu Date: Mon, 16 Apr 2018 15:33:03 +0300 Subject: cppcheck - fix variableScope in some files Reduced the scope of some variables in source. Change-Id: Ib3b521ca5df8b9b254b51eab5f1d7040d6cfd846 Reviewed-on: https://gerrit.libreoffice.org/52974 Tested-by: Jenkins Reviewed-by: Noel Grandin --- libreofficekit/qa/tilebench/tilebench.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libreofficekit') diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx index ed3d57d05b3f..3c62e2e36838 100644 --- a/libreofficekit/qa/tilebench/tilebench.cxx +++ b/libreofficekit/qa/tilebench/tilebench.cxx @@ -104,12 +104,6 @@ int main( int argc, char* argv[] ) return 1; } - // Use realistic dimensions, similar to the Online client. - long nTilePixelWidth = 512; - long nTilePixelHeight = 512; - long nTileTwipWidth = 3840; - long nTileTwipHeight = 3840; - aTimes.emplace_back("initialization"); // coverity[tainted_string] - build time test tool Office *pOffice = lok_cpp_init(argv[1]); @@ -153,6 +147,12 @@ int main( int argc, char* argv[] ) } aTimes.emplace_back(); + // Use realistic dimensions, similar to the Online client. + long nTilePixelWidth = 512; + long nTilePixelHeight = 512; + long nTileTwipWidth = 3840; + long nTileTwipHeight = 3840; + // Estimate the maximum tiles based on the number of parts requested, if Writer. if (pDocument->getDocumentType() == LOK_DOCTYPE_TEXT) max_tiles = static_cast(ceil(max_parts * 16128. / nTilePixelHeight)) * ceil(static_cast(nWidth) / nTilePixelWidth); -- cgit