diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-11-10 17:34:31 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-11-10 23:11:28 +0100 |
commit | afbfe42e63cdba1a18c292d7eb4875009b0f19c0 (patch) | |
tree | 4d4feec02830008c898cc1cd4eff768f26efda84 /vcl | |
parent | 41b09c0ed154aed0caf325a1ab0b7f7ffa688a35 (diff) |
clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d
Reviewed-on: https://gerrit.libreoffice.org/63241
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/canvasbitmaptest.cxx | 2 | ||||
-rw-r--r-- | vcl/source/fontsubset/ttcr.cxx | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index e013c5d602a9..070b8b6217a4 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -637,7 +637,7 @@ void CanvasBitmapTest::runTest() // Testing VclCanvasBitmap wrapper - for( unsigned int i=0; i<SAL_N_ELEMENTS(lcl_depths); ++i ) + for( size_t i=0; i<SAL_N_ELEMENTS(lcl_depths); ++i ) { const sal_Int8 nDepth( lcl_depths[i] ); Bitmap aBitmap(Size(200,200),nDepth); diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index 06bbe376f3a4..4a1c3e8db848 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -1047,8 +1047,6 @@ TrueTypeTable *TrueTypeTableNew_post(sal_uInt32 format, int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag) { /* XXX do a binary search */ - unsigned int i; - assert(_this != nullptr); assert(ptr != nullptr); assert(len != nullptr); @@ -1061,7 +1059,7 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt3 _this->rawdata = nullptr; } - for(i=0; i < SAL_N_ELEMENTS(vtable2); i++) { + for(size_t i=0; i < SAL_N_ELEMENTS(vtable2); i++) { if (_this->tag == vtable2[i].tag) { return vtable2[i].f(_this, ptr, len, tag); } @@ -1443,13 +1441,11 @@ extern "C" { vcl::TrueTypeTable *_this = static_cast<vcl::TrueTypeTable *>(arg); /* XXX do a binary search */ - unsigned int i; - assert(_this != nullptr); if (_this->rawdata) free(_this->rawdata); - for(i=0; i < SAL_N_ELEMENTS(vcl::vtable1); i++) { + for(size_t i=0; i < SAL_N_ELEMENTS(vcl::vtable1); i++) { if (_this->tag == vcl::vtable1[i].tag) { vcl::vtable1[i].f(_this); return; |