[Libreoffice-commits] core.git: include/canvas

Julien Nabet serval2412 at yahoo.fr
Thu Mar 29 16:22:20 UTC 2018


 include/canvas/spriteredrawmanager.hxx |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 1a2097e62f70d9babcd29b90b80c813890f19ebb
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Mar 29 15:57:21 2018 +0200

    Use for-range loop in include/canvas
    
    Change-Id: I29c4af5a59f72c478090f1b8625a0507d461374a
    Reviewed-on: https://gerrit.libreoffice.org/52077
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/canvas/spriteredrawmanager.hxx b/include/canvas/spriteredrawmanager.hxx
index edb10e9abfc7..e7df64e81d93 100644
--- a/include/canvas/spriteredrawmanager.hxx
+++ b/include/canvas/spriteredrawmanager.hxx
@@ -326,17 +326,11 @@ namespace canvas
                         // involved. Have to sort component lists for
                         // sprite prio.
                         VectorOfSprites aSortedUpdateSprites;
-                        SpriteConnectedRanges::ComponentListType::const_iterator aCurr(
-                            rUpdateArea.maComponentList.begin() );
-                        const SpriteConnectedRanges::ComponentListType::const_iterator aEnd(
-                            rUpdateArea.maComponentList.end() );
-                        while( aCurr != aEnd )
+                        for (auto const& elem : rUpdateArea.maComponentList)
                         {
-                            const Sprite::Reference& rSprite( aCurr->second.getSprite() );
+                            const Sprite::Reference& rSprite( elem.second.getSprite() );
                             if( rSprite.is() )
                                 aSortedUpdateSprites.push_back( rSprite );
-
-                            ++aCurr;
                         }
 
                         ::std::sort( aSortedUpdateSprites.begin(),


More information about the Libreoffice-commits mailing list