From b8b616e282aa4158fe28ca570a8602c06f7cb792 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 6 Aug 2020 21:16:48 -0700 Subject: [PATCH] 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. --- desktop_version/src/UtilityClass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/UtilityClass.cpp b/desktop_version/src/UtilityClass.cpp index f784dfc1..9ff685f6 100644 --- a/desktop_version/src/UtilityClass.cpp +++ b/desktop_version/src/UtilityClass.cpp @@ -211,14 +211,14 @@ bool is_positive_num(const std::string& str, bool hex) { if (hex) { - if (!std::isxdigit(static_cast(str[i]))) + if (!isxdigit(static_cast(str[i]))) { return false; } } else { - if (!std::isdigit(static_cast(str[i]))) + if (!SDL_isdigit(static_cast(str[i]))) { return false; }