Enhance pluginsAdmin.h

use _TCHAR and _istdigit() to avoid wchar/char mismatch, and possible undefined behavior.
https://en.cppreference.com/w/cpp/string/byte/isdigit

Close #5067
This commit is contained in:
0017031 2018-11-28 11:31:56 +08:00 committed by Don HO
parent b4f012985f
commit d7507013e0

View File

@ -51,7 +51,7 @@ struct Version
generic_string toString();
bool isNumber(const generic_string& s) const {
return !s.empty() &&
find_if(s.begin(), s.end(), [](char c) { return !isdigit(c); }) == s.end();
find_if(s.begin(), s.end(), [](_TCHAR c) { return !_istdigit(c); }) == s.end();
};
int compareTo(const Version& v2c) const;