diff options
author | Alexander Tkachev | 2016-05-11 14:02:32 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:05:07 +0600 |
commit | e4e2ec390d364770d16a3a478796c1b949e8645f (patch) | |
tree | 4bfcb6288671e646dcf759c00f93e6bc8c5553b5 /common/json.h | |
parent | 2ac2816d68c11b50796457f7d41896a1ed7d571e (diff) | |
download | scummvm-rg350-e4e2ec390d364770d16a3a478796c1b949e8645f.tar.gz scummvm-rg350-e4e2ec390d364770d16a3a478796c1b949e8645f.tar.bz2 scummvm-rg350-e4e2ec390d364770d16a3a478796c1b949e8645f.zip |
CLOUD: Remove wcsncasecmp() usage from SimpleJSON
Replaced with scumm_strnicmp().
Diffstat (limited to 'common/json.h')
-rw-r--r-- | common/json.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/common/json.h b/common/json.h index 5114947966..c9debf05af 100644 --- a/common/json.h +++ b/common/json.h @@ -54,8 +54,6 @@ // Win32 incompatibilities #if defined(WIN32) && !defined(__GNUC__) -#define wcsncasecmp _strnicmp - static inline bool isnan(double x) { return x != x; } @@ -65,44 +63,7 @@ static inline bool isinf(double x) { } #endif -// Linux compile fix - from quaker66 -#ifdef __GNUC__ - #include <cstring> - #include <cstdlib> -#endif - -// Mac compile fixes - from quaker66, Lion fix by dabrahams -// Tkachov: I probably broke those -#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__)) || defined(ANDROID) - #include <wctype.h> - #include <wchar.h> - - static inline int wcsncasecmp(const char *s1, const char *s2, size_t n) - { - int lc1 = 0; - int lc2 = 0; - - while (n--) - { - lc1 = towlower (*s1); - lc2 = towlower (*s2); - - if (lc1 != lc2) - return (lc1 - lc2); - - if (!lc1) - return 0; - - ++s1; - ++s2; - } - - return 0; - } -#endif - // Simple function to check a string 's' has at least 'n' characters -// Tkachov: that's not wchar_t anymore, though it should work for C-strings too static inline bool simplejson_wcsnlen(const char *s, size_t n) { if (s == 0) return false; @@ -122,8 +83,6 @@ class JSONValue; typedef Array<JSONValue*> JSONArray; typedef HashMap<String, JSONValue*> JSONObject; -//JSONValue.h: - class JSON; enum JSONType { JSONType_Null, JSONType_String, JSONType_Bool, JSONType_Number, JSONType_Array, JSONType_Object }; @@ -183,8 +142,6 @@ private: }; -//EOF JSONValue.h - class JSON { friend class JSONValue; |