diff options
-rw-r--r-- | vcl/qa/cppunit/canvasbitmaptest.cxx | 3 | ||||
-rw-r--r-- | vcl/source/app/IconThemeInfo.cxx | 9 | ||||
-rw-r--r-- | vcl/source/app/IconThemeSelector.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 6 |
4 files changed, 8 insertions, 15 deletions
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index a69460ba5a96..07f2a51c85ef 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -41,6 +41,7 @@ #include "vcl/bitmapex.hxx" #include "canvasbitmap.hxx" +#include <algorithm> using namespace ::com::sun::star; using namespace vcl::unotools; @@ -152,7 +153,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp, aRes.first == pRGBEnd); CPPUNIT_ASSERT_MESSAGE( "rgb colors are not within [0,1] range", - std::find_if(pRGBStart,pRGBEnd,&rangeCheck) == pRGBEnd); + std::none_of(pRGBStart,pRGBEnd,&rangeCheck)); CPPUNIT_ASSERT_MESSAGE( "First pixel is not white", pRGBStart[0].Red == 1.0 && pRGBStart[0].Green == 1.0 && pRGBStart[0].Blue == 1.0); diff --git a/vcl/source/app/IconThemeInfo.cxx b/vcl/source/app/IconThemeInfo.cxx index 88d517cf93cc..869eb85e40db 100644 --- a/vcl/source/app/IconThemeInfo.cxx +++ b/vcl/source/app/IconThemeInfo.cxx @@ -155,14 +155,7 @@ IconThemeInfo::FindIconThemeById(const std::vector<vcl::IconThemeInfo>& themes, /*static*/ bool IconThemeInfo::IconThemeIsInVector(const std::vector<vcl::IconThemeInfo>& themes, const OUString& themeId) { - std::vector<vcl::IconThemeInfo>::const_iterator it = std::find_if(themes.begin(), themes.end(), - SameTheme(themeId)); - if (it != themes.end()) { - return true; - } - else { - return false; - } + return std::any_of(themes.begin(), themes.end(), SameTheme(themeId)); } } // end namespace vcl diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx index b9beee30dc10..f7971dd17e1a 100644 --- a/vcl/source/app/IconThemeSelector.cxx +++ b/vcl/source/app/IconThemeSelector.cxx @@ -40,9 +40,8 @@ namespace { bool icon_theme_is_in_installed_themes(const OUString& theme, const std::vector<IconThemeInfo>& installedThemes) { - return std::find_if(installedThemes.begin(), installedThemes.end(), - SameTheme(theme) - ) != installedThemes.end(); + return std::any_of(installedThemes.begin(), installedThemes.end(), + SameTheme(theme)); } } // end anonymous namespace diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index aef326cb8f91..d47e35db9883 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -459,7 +459,7 @@ namespace { else // a filter group -> search the sub filters bMatch = - _rEntry.endSubFilters() != ::std::find_if( + ::std::any_of( _rEntry.beginSubFilters(), _rEntry.endSubFilters(), *this @@ -481,7 +481,7 @@ bool SalGtkFilePicker::FilterNameExists( const OUString& rTitle ) if( m_pFilterList ) bRet = - m_pFilterList->end() != ::std::find_if( + ::std::any_of( m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch( rTitle ) @@ -499,7 +499,7 @@ bool SalGtkFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters ) const UnoFilterEntry* pStart = _rGroupedFilters.getConstArray(); const UnoFilterEntry* pEnd = pStart + _rGroupedFilters.getLength(); for( ; pStart != pEnd; ++pStart ) - if( m_pFilterList->end() != ::std::find_if( + if( ::std::any_of( m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch( pStart->First ) ) ) |