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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 11 09:08:13 UTC 2020


 chart2/source/tools/DataSourceHelper.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit da3922951be6e35852a47f1d2e27d044a8651d7c
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Apr 11 09:00:34 2020 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Apr 11 11:07:29 2020 +0200

    Use range-based for loop
    
    Change-Id: I2ee332ffeb9004535882a7859f1821624ef5efa6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92017
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 4b124aea28a4..3b6f08ef5420 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -66,9 +66,9 @@ void lcl_addDataSourceRanges(
 {
     if( xDataSource.is() )
     {
-        uno::Sequence< uno::Reference< data::XLabeledDataSequence > > aDataSequences( xDataSource->getDataSequences() );
-        for( sal_Int32 i=0; i<aDataSequences.getLength(); ++i)
-            lcl_addRanges( rOutResult, aDataSequences[i] );
+        const auto aDataSequences(xDataSource->getDataSequences());
+        for (const auto& rDataSequence : aDataSequences)
+            lcl_addRanges(rOutResult, rDataSequence);
     }
 }
 


More information about the Libreoffice-commits mailing list