mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-02 15:32:19 +03:00
Use SDL_isxdigit() in favor of VVV_isxdigit()
SDL_isxdigit() was added in SDL 2.0.16, so we no longer have to implement isxdigit() ourselves.
This commit is contained in:
@@ -288,13 +288,6 @@ bool is_number(const char* str)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool VVV_isxdigit(const unsigned char digit)
|
|
||||||
{
|
|
||||||
return (digit >= 'a' && digit <= 'f')
|
|
||||||
|| (digit >= 'A' && digit <= 'F')
|
|
||||||
|| SDL_isdigit(digit);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_positive_num(const char* str, const bool hex)
|
bool is_positive_num(const char* str, const bool hex)
|
||||||
{
|
{
|
||||||
if (str[0] == '\0')
|
if (str[0] == '\0')
|
||||||
@@ -306,7 +299,7 @@ bool is_positive_num(const char* str, const bool hex)
|
|||||||
{
|
{
|
||||||
if (hex)
|
if (hex)
|
||||||
{
|
{
|
||||||
if (!VVV_isxdigit(str[i]))
|
if (!SDL_isxdigit(str[i]))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user