From 11c8f511779d133229e384b25636e0bba28b3089 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Tue, 4 Jul 2017 13:52:05 +0200 Subject: tdf#108287 replace std::bind2nd with lambda in preparation of removal of deprecated std::binary_function Change-Id: Iabb02b100975f67665be9d6d562b7206ef846107 Reviewed-on: https://gerrit.libreoffice.org/39513 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../unix/sysshell/recently_used_file_handler.cxx | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'shell') diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx index cf7dad8e5c0f..e9686512d079 100644 --- a/shell/source/unix/sysshell/recently_used_file_handler.cxx +++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -50,18 +49,6 @@ namespace /* private */ { #define TAG_GROUPS "Groups" #define TAG_GROUP "Group" - - // compare two string_t's case insensitive, may also be done - // by specifying special traits for the string type but in this - // case it's easier to do it this way - struct str_icase_cmp : - public std::binary_function - { - bool operator() (const string_t& s1, const string_t& s2) const - { return (0 == strcasecmp(s1.c_str(), s2.c_str())); } - }; - - struct recently_used_item { recently_used_item() @@ -116,7 +103,11 @@ namespace /* private */ { return (has_groups() && iter_end != std::find_if( groups_.begin(), iter_end, - std::bind2nd(str_icase_cmp(), name))); + [&name](const string_t& s) + { return (0 == strcasecmp(s.c_str(), name.c_str())); }) + // compare two string_t's case insensitive + ); + } void write_xml(const recently_used_file& file) const -- cgit