[Libreoffice-commits] .: canvas/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Thu Nov 3 01:53:16 PDT 2011
canvas/source/tools/spriteredrawmanager.cxx | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
New commits:
commit 7c22d03fb6394ae4b9a82061cb160c1bcd7df8da
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Thu Nov 3 09:48:52 2011 +0100
Better fix for removed RangeExpander
The sole reason for that late class was the overloaded
Range::expand() method - but it's actually quite easy to
disambiguate that for boost::bind.
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index 730361c..8f6f306 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -222,24 +222,6 @@ namespace canvas
SpriteRedrawManager::SpriteConnectedRanges& mrUpdater;
const SpriteRedrawManager::VectorOfChangeRecords& mrChangeContainer;
};
-
- class RangeExpander
- {
- private:
- basegfx::B2DRange& mrBounds;
-
- public:
- typedef void result_type;
-
- RangeExpander( basegfx::B2DRange& rBounds ) : mrBounds( rBounds )
- {
- }
-
- void operator()( const basegfx::B2DRange& rBounds )
- {
- mrBounds.expand( rBounds );
- }
- };
}
void SpriteRedrawManager::setupUpdateAreas( SpriteConnectedRanges& rUpdateAreas ) const
@@ -441,7 +423,9 @@ namespace canvas
::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() );
::std::for_each( aBegin,
aEnd,
- ::boost::bind( RangeExpander(aTrueArea),
+ ::boost::bind( (void (basegfx::B2DRange::*)(const basegfx::B2DRange&))(
+ &basegfx::B2DRange::expand),
+ aTrueArea,
::boost::bind( &SpriteInfo::getUpdateArea,
::boost::bind( ::o3tl::select2nd<AreaComponent>(),
_1 ) ) ) );
More information about the Libreoffice-commits
mailing list