From 97b6fd8e9ec4c655a5b73cbb4f64be06e7057242 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sat, 8 Sep 2018 09:50:18 +0300 Subject: Replace find_if with proper quantifier algorithms Missed in 085269d25a705b656436feac47149296b4b4b35d Change-Id: I3cfab57232908b48d090658e0fbc948d62b3fc6f Reviewed-on: https://gerrit.libreoffice.org/60180 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/dialog/charmap.cxx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'svx/source') diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 0d28ecf57e1c..aa36c3198926 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -276,13 +276,8 @@ void SvxShowCharSet::updateFavCharacterList(const OUString& sTitle, const OUStri { if(isFavChar(sTitle, rFont)) { - auto itChar = std::find_if(maFavCharList.begin(), - maFavCharList.end(), - [sTitle] (const OUString & a) { return a == sTitle; }); - - auto itChar2 = std::find_if(maFavCharFontList.begin(), - maFavCharFontList.end(), - [rFont] (const OUString & a) { return a == rFont; }); + auto itChar = std::find(maFavCharList.begin(), maFavCharList.end(), sTitle); + auto itChar2 = std::find(maFavCharFontList.begin(), maFavCharFontList.end(), rFont); // if Fav char to be added is already in list, remove it if( itChar != maFavCharList.end() && itChar2 != maFavCharFontList.end() ) @@ -307,13 +302,8 @@ void SvxShowCharSet::updateFavCharacterList(const OUString& sTitle, const OUStri return; } - auto itChar = std::find_if(maFavCharList.begin(), - maFavCharList.end(), - [sTitle] (const OUString & a) { return a == sTitle; }); - - auto itChar2 = std::find_if(maFavCharFontList.begin(), - maFavCharFontList.end(), - [rFont] (const OUString & a) { return a == rFont; }); + auto itChar = std::find(maFavCharList.begin(), maFavCharList.end(), sTitle); + auto itChar2 = std::find(maFavCharFontList.begin(), maFavCharFontList.end(), rFont); // if Fav char to be added is already in list, remove it if( itChar != maFavCharList.end() && itChar2 != maFavCharFontList.end() ) -- cgit