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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 27 09:37:29 UTC 2020


 toolkit/source/controls/unocontrolmodel.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 8762cc5f41e00e6f15e67b4f691e40751588ce17
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jan 27 08:43:10 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Jan 27 10:36:50 2020 +0100

    Split independent loop vars, giving them appropriate types
    
    ...and thus avoiding an unnecessary explicit cast from sal_Int32 to sal_uInt32
    
    Change-Id: I536fc52960259509a3b722fed9268dc6ec9e76a6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87482
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index aa4d55237de0..a735178bdca1 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -785,8 +785,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
     // Used for import of old parts in css::awt::FontDescriptor
     std::unique_ptr<css::awt::FontDescriptor> pFD;
 
-    sal_uInt32 i;
-    for ( i = 0; i < nProps; i++ )
+    for ( sal_uInt32 i = 0; i < nProps; i++ )
     {
         sal_Int32 nPropDataBeginMark = xMark->createMark();
         sal_Int32 nPropDataLen = InStream->readLong();
@@ -999,7 +998,7 @@ void UnoControlModel::read( const css::uno::Reference< css::io::XObjectInputStre
     }
     if ( bInvalidEntries )
     {
-        for ( i = 0; i < static_cast<sal_uInt32>(aProps.getLength()); i++ )
+        for ( sal_Int32 i = 0; i < aProps.getLength(); i++ )
         {
             if ( aProps.getConstArray()[i].isEmpty() )
             {


More information about the Libreoffice-commits mailing list