mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
CRAN: replaced deprecated std::ptr_fun with lambda function
This commit is contained in:
parent
1257f8c7c9
commit
597bcd76a2
@ -280,13 +280,21 @@ class CParser: public PHRQ_base
|
|||||||
// Global functions
|
// Global functions
|
||||||
static inline std::string &trim_left(std::string &s)
|
static inline std::string &trim_left(std::string &s)
|
||||||
{
|
{
|
||||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
|
#if (__GNUC__ && (__cplusplus >= 201103L)) || (_MSC_VER >= 1600)
|
||||||
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) {return !std::isspace(c);}));
|
||||||
|
#else
|
||||||
|
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
|
||||||
|
#endif
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
static inline std::string &trim_right(std::string &s)
|
static inline std::string &trim_right(std::string &s)
|
||||||
{
|
{
|
||||||
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
#if (__GNUC__ && (__cplusplus >= 201103L)) || (_MSC_VER >= 1600)
|
||||||
return s;
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int c) {return !std::isspace(c);}).base(), s.end());
|
||||||
|
#else
|
||||||
|
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
||||||
|
#endif
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
static inline std::string &trim(std::string &s)
|
static inline std::string &trim(std::string &s)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user