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

Stephan Bergmann sbergman at redhat.com
Fri Mar 10 08:38:24 UTC 2017


 cui/source/options/treeopt.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 040d455cae75d961f01b39afe0bfb4b031345c5c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Mar 10 09:37:41 2017 +0100

    cid#1402150: Try to silence false positive report
    
    Change-Id: Ied2b1a8b0eb0aa9e7e48d1445677c8536f6388c8

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 1831df9..7d7b261 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1994,13 +1994,13 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
         for ( auto const & i: pModule->m_aNodeList )
         {
             OUString sNodeId = i->m_sId;
-            for ( VectorOfNodes::size_type j = 0; j < aNodeList.size(); ++j )
+            for ( auto j = aNodeList.begin(); j != aNodeList.end(); ++j )
             {
-                OptionsNode* pNode = aNodeList[j];
+                OptionsNode* pNode = *j;
                 if ( pNode->m_sId == sNodeId )
                 {
                     aOutNodeList.push_back( pNode );
-                    aNodeList.erase( aNodeList.begin() + j );
+                    aNodeList.erase( j );
                     break;
                 }
             }


More information about the Libreoffice-commits mailing list