From d7362005ba3b330a9c4c8e464fa73dce625f9b68 Mon Sep 17 00:00:00 2001 From: Kurt Slagle Date: Wed, 27 Sep 2017 12:56:57 -0500 Subject: [PATCH] Change use of std::not1 and std::ptr_fun to use lambdas (#77) Change use of std::not1 and std::mem_fun to lambdas due to c++17 deprecations (closes #75) --- src/TGUI/Global.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TGUI/Global.cpp b/src/TGUI/Global.cpp index 924edce9..bf8ef5fd 100644 --- a/src/TGUI/Global.cpp +++ b/src/TGUI/Global.cpp @@ -165,8 +165,8 @@ namespace tgui std::string trim(std::string str) { - str.erase(str.begin(), std::find_if(str.begin(), str.end(), std::not1(std::ptr_fun(std::isspace)))); - str.erase(std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun(std::isspace))).base(), str.end()); + str.erase(str.begin(), std::find_if(str.begin(), str.end(), [](int c) { return !std::isspace(c); })); + str.erase(std::find_if(str.rbegin(), str.rend(), [](int c) { return !std::isspace(c); }).base(), str.end()); return str; }