diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-03-28 17:12:04 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-31 08:00:13 +0000 |
commit | 1aa4df615fa5599d05e9dd5e925b5852676185fa (patch) | |
tree | 1f637fa13140941a5775c91f058d0742f911693f /vcl | |
parent | 2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (diff) |
use SAL_N_ELEMENTS in for loops
for with
git grep -n 'for.*sizeof'
Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f
Reviewed-on: https://gerrit.libreoffice.org/23569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/fontsubset/ttcr.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index 58747494f439..49311603569d 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -1111,7 +1111,7 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt3 _this->rawdata = nullptr; } - for(i=0; i < sizeof(vtable2)/sizeof(*vtable2); i++) { + for(i=0; i < SAL_N_ELEMENTS(vtable2); i++) { if (_this->tag == vtable2[i].tag) { return vtable2[i].f(_this, ptr, len, tag); } @@ -1511,7 +1511,7 @@ extern "C" if (_this->rawdata) free(_this->rawdata); - for(i=0; i < sizeof(vcl::vtable1)/sizeof(*vcl::vtable1); i++) { + for(i=0; i < SAL_N_ELEMENTS(vcl::vtable1); i++) { if (_this->tag == vcl::vtable1[i].tag) { vcl::vtable1[i].f(_this); return; |