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)0.8
parent
e3b2eb65bc
commit
d7362005ba
|
@ -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<int, int>(std::isspace))));
|
||||
str.erase(std::find_if(str.rbegin(), str.rend(), std::not1(std::ptr_fun<int, int>(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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue