diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-05-04 09:33:59 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-07 14:03:42 +0000 |
commit | 5a7c1bc635c7e0377bb743d91b0cf385397b7337 (patch) | |
tree | 8c640bf0b8c5a1cc0d749f5cf64fdd5e48945cf1 /canvas/source/tools/spriteredrawmanager.cxx | |
parent | b4d7f8248496610a508b8edbcd57b9875e68bd81 (diff) |
simplify code by replacing std::find_if with std::any_of/std::none_of
Change-Id: Ife6ab3544f73b1de60f5241c68466045161a4d88
Reviewed-on: https://gerrit.libreoffice.org/15615
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'canvas/source/tools/spriteredrawmanager.cxx')
-rw-r--r-- | canvas/source/tools/spriteredrawmanager.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index 7873883c276a..a98a65e261c1 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -423,12 +423,12 @@ namespace canvas // and check whether _any_ of the sprites tells that its area // update will not be opaque. - return (::std::find_if( rUpdateArea.maComponentList.begin(), + return ::std::none_of( rUpdateArea.maComponentList.begin(), aEnd, ::boost::bind( &SpriteRedrawManager::isAreaUpdateNotOpaque, this, ::boost::cref(aTrueArea), - _1 ) ) == aEnd ); + _1 ) ); } bool SpriteRedrawManager::areSpritesChanged( const UpdateArea& rUpdateArea ) const @@ -440,12 +440,12 @@ namespace canvas // component (return false) const SpriteConnectedRanges::ComponentListType::const_iterator aEnd( rUpdateArea.maComponentList.end() ); - return (::std::find_if( rUpdateArea.maComponentList.begin(), + return ::std::any_of( rUpdateArea.maComponentList.begin(), aEnd, ::boost::bind( &SpriteInfo::needsUpdate, ::boost::bind( ::o3tl::select2nd<SpriteConnectedRanges::ComponentType>(), - _1 ) ) ) != aEnd ); + _1 ) ) ); } SpriteRedrawManager::SpriteRedrawManager() : |