mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-03-09 11:09:32 +01:00
Fix the warnings again
This commit is contained in:
parent
84e5741204
commit
afe2fbdc3f
@ -178,10 +178,8 @@ private:
|
||||
}
|
||||
|
||||
// Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
|
||||
if (type_ == kUTF16LE || type_ == kUTF16BE)
|
||||
RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
|
||||
else if (type_ == kUTF32LE || type_ == kUTF32BE)
|
||||
RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
|
||||
if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
|
||||
if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
|
||||
}
|
||||
|
||||
typedef Ch (*TakeFunc)(InputByteStream& is);
|
||||
@ -213,10 +211,8 @@ public:
|
||||
RAPIDJSON_ASSERT(type >= kUTF8 && type <= kUTF32BE);
|
||||
|
||||
// Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
|
||||
if (type_ == kUTF16LE || type_ == kUTF16BE)
|
||||
RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
|
||||
else if (type_ == kUTF32LE || type_ == kUTF32BE)
|
||||
RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
|
||||
if (type_ == kUTF16LE || type_ == kUTF16BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 2);
|
||||
if (type_ == kUTF32LE || type_ == kUTF32BE) RAPIDJSON_ASSERT(sizeof(Ch) >= 4);
|
||||
|
||||
static const PutFunc f[] = { RAPIDJSON_ENCODINGS_FUNC(Put) };
|
||||
putFunc_ = f[type_];
|
||||
|
Loading…
x
Reference in New Issue
Block a user