mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-23 03:17:39 +02:00
fix deprecation warning
This commit is contained in:
parent
c32561730c
commit
24b357287c
2 changed files with 4 additions and 4 deletions
|
@ -938,8 +938,8 @@ inline void OptionParser::parse(const std::string& ini_filename)
|
||||||
std::string line;
|
std::string line;
|
||||||
|
|
||||||
auto trim = [](std::string& s) {
|
auto trim = [](std::string& s) {
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !std::isspace(ch); }));
|
||||||
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(), s.end());
|
||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,14 +33,14 @@ namespace string
|
||||||
// trim from start
|
// trim from start
|
||||||
static inline std::string& ltrim(std::string& s)
|
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))));
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !std::isspace(ch); }));
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// trim from end
|
// trim from end
|
||||||
static inline std::string& rtrim(std::string& s)
|
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))).base(), s.end());
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(), s.end());
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue