Kaydet (Commit) c85142eb authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Fix more incorrect iterator re-use.

Follow-up fix for 540963d8
std::algos use iterator arguments by value, and may change them.
üst 540963d8
......@@ -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,
......
......@@ -113,10 +113,9 @@ void BaseContainerNode::appendChildNode( AnimationNodeSharedPtr const& pNode )
bool BaseContainerNode::isChildNode( AnimationNodeSharedPtr const& pNode ) const
{
// find given notifier in child vector
VectorOfNodes::const_iterator const iBegin( maChildren.begin() );
VectorOfNodes::const_iterator const iEnd( maChildren.end() );
VectorOfNodes::const_iterator const iFind(
std::find( iBegin, iEnd, pNode ) );
std::find( maChildren.begin(), iEnd, pNode ) );
return (iFind != iEnd);
}
......
......@@ -617,10 +617,10 @@ bool EventMultiplexerImpl::notifyMouseHandlers(
// find corresponding view (to map mouse position into user
// coordinate space)
UnoViewVector::const_iterator aIter;
const UnoViewVector::const_iterator aBegin( mrViewContainer.begin() );
const UnoViewVector::const_iterator aEnd ( mrViewContainer.end() );
if( (aIter=::std::find_if(
aBegin, aEnd,
mrViewContainer.begin(),
aEnd,
boost::bind( std::equal_to< uno::Reference<
presentation::XSlideShowView > >(),
boost::cref( xView ),
......
......@@ -472,7 +472,7 @@ namespace slideshow
pArray + nLen,
NamedValueComparator( rSearchKey ) );
if( pFound == pArray + nLen )
if( pFound == rSequence.getConstArray() + nLen )
return false;
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment