summaryrefslogtreecommitdiff
blob: d527895e998d390e5594937c80853fda9124efb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
commit 08b62eae9f0b249c667dba7f6a964da8e3a82377
Author: Peter Asplund <peter.azp@gmail.com>
Date:   Tue Feb 28 22:39:07 2023 +0100

    Convert deprecated call to ptr_fun to lambda

diff --git a/src/TmxUtil.cpp b/src/TmxUtil.cpp
index 26993c7..184842d 100644
--- a/src/TmxUtil.cpp
+++ b/src/TmxUtil.cpp
@@ -46,13 +46,13 @@ namespace Tmx {
 
     // trim from start
     static inline std::string &ltrim(std::string &s) {
-        s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
+        s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c){ return !std::isspace(c); }));
         return s;
     }
 
     // trim from end
     static inline std::string &rtrim(std::string &s) {
-        s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
+        s.erase(std::find_if(s.rbegin(), s.rend(), [](int c){ return !std::isspace(c); }).base(), s.end());
         return s;
     }