diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-26 15:35:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-26 20:39:29 +0100 |
commit | 5da1aa90bd5ee298c06462d880985d2f4f41c79f (patch) | |
tree | 17f4bd6bf4e3b5f69b9afa2eb66e31bb22a46761 /vcl/source | |
parent | 9befa8b1743526759b88e56afc98a78ba25100f6 (diff) |
improve scoping
Change-Id: I560e02d7a6a2685f98e55a66b2805217f1dfcbff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113166
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index fe0f0ef1562a..a02e179dca93 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -279,17 +279,15 @@ static void HexFmtDispose(HexFmt *_this) static void HexFmtBlockWrite(HexFmt *_this, const void *ptr, sal_uInt32 size) { - sal_uInt8 Ch; - sal_uInt32 i; - if (_this->total + size > 65534) { HexFmtFlush(_this); HexFmtCloseString(_this); _this->total = 0; HexFmtOpenString(_this); } - for (i=0; i<size; i++) { - Ch = static_cast<sal_uInt8 const *>(ptr)[i]; + + for (sal_uInt32 i = 0; i < size; ++i) { + sal_uInt8 Ch = static_cast<sal_uInt8 const *>(ptr)[i]; _this->buffer[_this->bufpos++] = toHex(Ch >> 4); _this->buffer[_this->bufpos++] = toHex(Ch & 0xF); if (_this->bufpos == HFORMAT_LINELEN) { |