summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-07-04 13:52:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-05 08:39:17 +0200
commit11c8f511779d133229e384b25636e0bba28b3089 (patch)
tree3198d7da6501e1a7ce0b9b774e16d2b8674d987c /shell
parent6e3a5631861ba8b8072fae6c3e5bb1a81627b612 (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx19
1 files changed, 5 insertions, 14 deletions
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 <map>
#include <vector>
#include <algorithm>
-#include <functional>
#include <string.h>
#include <time.h>
@@ -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<string_t, string_t, bool>
- {
- 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