summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-01-09 18:04:58 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-01-09 18:37:52 +0100
commitc85142eb63c61de68aa7dbb10b2bcb8b48b870f9 (patch)
tree1463febf22a6bb33cdc974d7a886551265cfc7a1 /canvas
parent540963d879296ef81f883305057e63465b2ff586 (diff)
Fix more incorrect iterator re-use.
Follow-up fix for 540963d879296ef81f883305057e63465b2ff586 std::algos use iterator arguments by value, and may change them.
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/tools/spriteredrawmanager.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index 25accbe47278..2af5b34e6f8c 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -412,16 +412,11 @@ namespace canvas
if( nNumSprites > 3 || nNumSprites < 1 )
return false;
- const SpriteConnectedRanges::ComponentListType::const_iterator aBegin(
- rUpdateArea.maComponentList.begin() );
- const SpriteConnectedRanges::ComponentListType::const_iterator aEnd(
- rUpdateArea.maComponentList.end() );
-
// now, calc the _true_ update area, by merging all sprite's
// true update areas into one rectangle
- ::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() );
- ::std::for_each( aBegin,
- aEnd,
+ ::basegfx::B2DRange aTrueArea( rUpdateArea.maComponentList.begin()->second.getUpdateArea() );
+ ::std::for_each( rUpdateArea.maComponentList.begin(),
+ rUpdateArea.maComponentList.end(),
::boost::bind( (void (basegfx::B2DRange::*)(const basegfx::B2DRange&))(
&basegfx::B2DRange::expand),
aTrueArea,
@@ -429,9 +424,12 @@ namespace canvas
::boost::bind( ::o3tl::select2nd<AreaComponent>(),
_1 ) ) ) );
+ const SpriteConnectedRanges::ComponentListType::const_iterator aEnd(
+ rUpdateArea.maComponentList.end() );
+
// and check whether _any_ of the sprites tells that its area
// update will not be opaque.
- return (::std::find_if( aBegin,
+ return (::std::find_if( rUpdateArea.maComponentList.begin(),
aEnd,
::boost::bind( &SpriteRedrawManager::isAreaUpdateNotOpaque,
this,