build: Fix deprecation errors

This commit is contained in:
patrick96 2022-10-23 15:13:51 +02:00 committed by Patrick Ziegler
parent 87750c064e
commit 10cdec3b9f

View File

@ -128,7 +128,7 @@ namespace string_util {
* Trims all characters that match pred from the left * Trims all characters that match pred from the left
*/ */
string ltrim(string value, function<bool(char)> pred) { string ltrim(string value, function<bool(char)> pred) {
value.erase(value.begin(), find_if(value.begin(), value.end(), not1(pred))); value.erase(value.begin(), find_if(value.begin(), value.end(), std::not_fn(pred)));
return value; return value;
} }
@ -136,7 +136,7 @@ namespace string_util {
* Trims all characters that match pred from the right * Trims all characters that match pred from the right
*/ */
string rtrim(string value, function<bool(char)> pred) { string rtrim(string value, function<bool(char)> pred) {
value.erase(find_if(value.rbegin(), value.rend(), not1(pred)).base(), value.end()); value.erase(find_if(value.rbegin(), value.rend(), std::not_fn(pred)).base(), value.end());
return value; return value;
} }