1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Replace std::is[x]digit() with non-STL versions

std::isdigit() can be replaced with SDL_isdigit(), but there's no
equivalent for std::isxdigit() in the SDL standard library. So we'll
just use libc isxdigit() instead, it's fine.
This commit is contained in:
Misa 2020-08-06 21:16:48 -07:00 committed by Ethan Lee
parent 43cf3c4f19
commit b8b616e282

View file

@ -211,14 +211,14 @@ bool is_positive_num(const std::string& str, bool hex)
{
if (hex)
{
if (!std::isxdigit(static_cast<unsigned char>(str[i])))
if (!isxdigit(static_cast<unsigned char>(str[i])))
{
return false;
}
}
else
{
if (!std::isdigit(static_cast<unsigned char>(str[i])))
if (!SDL_isdigit(static_cast<unsigned char>(str[i])))
{
return false;
}