Merge pull request #1403 from jcmonnin/fix-warning

Fix warning when NDEBUG is defined [-Wunused-variable]
This commit is contained in:
Milo Yip 2018-11-22 12:22:41 +08:00 committed by GitHub
commit 595ed48d54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -460,8 +460,7 @@ protected:
PutReserve(*os_, length);
GenericStringStream<SourceEncoding> is(json);
while (RAPIDJSON_LIKELY(is.Tell() < length)) {
const Ch c = is.Peek();
RAPIDJSON_ASSERT(c != '\0');
RAPIDJSON_ASSERT(is.Peek() != '\0');
if (RAPIDJSON_UNLIKELY(!(writeFlags & kWriteValidateEncodingFlag ?
Transcoder<SourceEncoding, TargetEncoding>::Validate(is, *os_) :
Transcoder<SourceEncoding, TargetEncoding>::TranscodeUnsafe(is, *os_))))