diff options
author | Milo Yip <miloyip@gmail.com> | 2016-04-05 18:26:08 +0300 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2016-04-05 18:26:08 +0300 |
commit | 8991037ecd1a3a2bec97813b61c2a1993ad7fb6d (patch) | |
tree | ef48b67f4fe2f136e79b42e805132e990e83689e | |
parent | c843a2655bf58efd0ced40c5b55706eef45f0978 (diff) |
Revert using of static const back to enum due to gcc error
-rw-r--r-- | include/rapidjson/document.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 0ce2d2ae..e23e1ade 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -27,6 +27,7 @@ #ifdef _MSC_VER RAPIDJSON_DIAG_PUSH RAPIDJSON_DIAG_OFF(4127) // conditional expression is constant +RAPIDJSON_DIAG_OFF(4244) // conversion from kXxxFlags to 'uint16_t', possible loss of data #endif #ifdef __clang__ @@ -1794,17 +1795,17 @@ private: template <typename, typename> friend class GenericValue; template <typename, typename, typename> friend class GenericDocument; - static const uint16_t - kBoolFlag = 0x0008, - kNumberFlag = 0x0010, - kIntFlag = 0x0020, - kUintFlag = 0x0040, - kInt64Flag = 0x0080, - kUint64Flag = 0x0100, - kDoubleFlag = 0x0200, - kStringFlag = 0x0400, - kCopyFlag = 0x0800, - kInlineStrFlag = 0x1000, + enum { + kBoolFlag = 0x0008, + kNumberFlag = 0x0010, + kIntFlag = 0x0020, + kUintFlag = 0x0040, + kInt64Flag = 0x0080, + kUint64Flag = 0x0100, + kDoubleFlag = 0x0200, + kStringFlag = 0x0400, + kCopyFlag = 0x0800, + kInlineStrFlag = 0x1000, // Initial flags of different types. kNullFlag = kNullType, @@ -1822,7 +1823,8 @@ private: kObjectFlag = kObjectType, kArrayFlag = kArrayType, - kTypeMask = 0x07; + kTypeMask = 0x07 + }; static const SizeType kDefaultArrayCapacity = 16; static const SizeType kDefaultObjectCapacity = 16; |