[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Mar 26 19:40:20 UTC 2021


 vcl/source/fontsubset/sft.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 5da1aa90bd5ee298c06462d880985d2f4f41c79f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Mar 26 15:35:48 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 26 20:39:29 2021 +0100

    improve scoping
    
    Change-Id: I560e02d7a6a2685f98e55a66b2805217f1dfcbff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113166
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

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) {


More information about the Libreoffice-commits mailing list