diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h index 49cc0fb..6f5b690 100644 --- a/include/rapidjson/writer.h +++ b/include/rapidjson/writer.h @@ -460,8 +460,7 @@ protected: PutReserve(*os_, length); GenericStringStream 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::Validate(is, *os_) : Transcoder::TranscodeUnsafe(is, *os_))))