From c0b4627c1158cb29edc7316165f5a0edb1312889 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 29 Nov 2024 15:25:36 +1000 Subject: [PATCH] StringUtil: Drop old MacOS workaround --- src/common/string_util.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/common/string_util.h b/src/common/string_util.h index e5b821840..fee55fa51 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -22,9 +22,6 @@ #if !defined(_MSC_VER) #include #include -#ifdef __APPLE__ -#include -#endif #endif namespace StringUtil { @@ -175,8 +172,6 @@ inline std::optional FromChars(const std::string_view str, std::string_view* template::value, bool> = true> inline std::string ToChars(T value, int base = 10) { - // to_chars() requires macOS 10.15+. -#if !defined(__APPLE__) || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_15 constexpr size_t MAX_SIZE = 32; char buf[MAX_SIZE]; std::string ret; @@ -186,12 +181,6 @@ inline std::string ToChars(T value, int base = 10) ret.append(buf, result.ptr - buf); return ret; -#else - std::ostringstream ss; - ss.imbue(std::locale::classic()); - ss << std::setbase(base) << value; - return ss.str(); -#endif } template::value, bool> = true>