1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 22:18:30 +02: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;
}