mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
fixed POSIXCPUInfo trim
This commit is contained in:
parent
e0ab3830af
commit
6cbc09954a
|
|
@ -39,17 +39,18 @@
|
|||
|
||||
Platform::SystemInfo_struct Platform::SystemInfo;
|
||||
|
||||
static inline void rtrim(std::string &s)
|
||||
{
|
||||
//XXTH deprecated! s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end());
|
||||
//FIXME !!!! s.erase(std::find_if(s.rbegin(), s.rend(), static_cast<int(*)(int)>(std::isspace).base(), s.end());
|
||||
// trim from start (in place)
|
||||
static inline void ltrim(std::string &s) {
|
||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) {
|
||||
return !std::isspace(ch);
|
||||
}));
|
||||
}
|
||||
|
||||
static inline void ltrim(std::string &s)
|
||||
{
|
||||
//XXTH deprecated! s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace))));
|
||||
//using lambada
|
||||
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int c) {return !std::isspace(c);}));
|
||||
// trim from end (in place)
|
||||
static inline void rtrim(std::string &s) {
|
||||
s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) {
|
||||
return !std::isspace(ch);
|
||||
}).base(), s.end());
|
||||
}
|
||||
|
||||
static void getCPUInformation()
|
||||
|
|
|
|||
Loading…
Reference in a new issue