Skip to content
Snippets Groups Projects
Commit ab9a6f45 authored by Marko Petric's avatar Marko Petric Committed by MarkusFrankATcernch
Browse files

Replace ptr_fun with lambda

parent 2b3c9008
No related branches found
No related tags found
No related merge requests found
......@@ -49,14 +49,14 @@ namespace {
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))));
[](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)))
[](int c) {return !std::isspace(c);})
.base(),
s.end());
return s;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment