Skip to content

Commit

Permalink
StringUtils: fix build with -std=c++17
Browse files Browse the repository at this point in the history
  • Loading branch information
lrusak committed Sep 11, 2020
1 parent 2d90f98 commit a0d1a41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/StringUtils.cpp
Expand Up @@ -453,7 +453,7 @@ static int isspace_c(char c)

std::string& StringUtils::TrimLeft(std::string &str)
{
str.erase(str.begin(), ::find_if(str.begin(), str.end(), ::not1(::ptr_fun(isspace_c))));
str.erase(str.begin(), ::find_if(str.begin(), str.end(), [](char s) { return isspace_c(s) == 0; }));
return str;
}

Expand All @@ -466,7 +466,7 @@ std::string& StringUtils::TrimLeft(std::string &str, const char* const chars)

std::string& StringUtils::TrimRight(std::string &str)
{
str.erase(::find_if(str.rbegin(), str.rend(), ::not1(::ptr_fun(isspace_c))).base(), str.end());
str.erase(::find_if(str.rbegin(), str.rend(), [](char s) { return isspace_c(s) == 0; }).base(), str.end());
return str;
}

Expand Down

0 comments on commit a0d1a41

Please sign in to comment.