From 08b62eae9f0b249c667dba7f6a964da8e3a82377 Mon Sep 17 00:00:00 2001 From: Peter Asplund Date: Tue, 28 Feb 2023 22:39:07 +0100 Subject: [PATCH] Convert deprecated call to ptr_fun to lambda --- src/TmxUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 <rim(std::string &s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun(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(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; }