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.
This commit is contained in:
@@ -222,24 +222,6 @@ namespace canvas
|
|||||||
SpriteRedrawManager::SpriteConnectedRanges& mrUpdater;
|
SpriteRedrawManager::SpriteConnectedRanges& mrUpdater;
|
||||||
const SpriteRedrawManager::VectorOfChangeRecords& mrChangeContainer;
|
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
|
void SpriteRedrawManager::setupUpdateAreas( SpriteConnectedRanges& rUpdateAreas ) const
|
||||||
@@ -441,7 +423,9 @@ namespace canvas
|
|||||||
::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() );
|
::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() );
|
||||||
::std::for_each( aBegin,
|
::std::for_each( aBegin,
|
||||||
aEnd,
|
aEnd,
|
||||||
::boost::bind( RangeExpander(aTrueArea),
|
::boost::bind( (void (basegfx::B2DRange::*)(const basegfx::B2DRange&))(
|
||||||
|
&basegfx::B2DRange::expand),
|
||||||
|
aTrueArea,
|
||||||
::boost::bind( &SpriteInfo::getUpdateArea,
|
::boost::bind( &SpriteInfo::getUpdateArea,
|
||||||
::boost::bind( ::o3tl::select2nd<AreaComponent>(),
|
::boost::bind( ::o3tl::select2nd<AreaComponent>(),
|
||||||
_1 ) ) ) );
|
_1 ) ) ) );
|
||||||
|
Reference in New Issue
Block a user