Error can only be assigned once

This commit is contained in:
Milo Yip 2014-06-27 22:13:02 +08:00
parent bb889b6ab6
commit b0059483c8

View File

@ -23,11 +23,10 @@
#ifndef RAPIDJSON_PARSE_ERROR_NORETURN
#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) \
RAPIDJSON_MULTILINEMACRO_BEGIN \
if (!HasParseError()) {\
RAPIDJSON_ASSERT(!HasParseError()); /* Error can only be assigned once */ \
parseErrorCode_ = parseErrorCode; \
errorOffset_ = offset; \
}\
RAPIDJSON_MULTILINEMACRO_END
errorOffset_ = offset; \
RAPIDJSON_MULTILINEMACRO_END
#endif
#ifndef RAPIDJSON_PARSE_ERROR