Cpp version depended if constexpr schema.h

Fix windows compile warning C4127
This commit is contained in:
SilverPlate3 2024-07-23 11:20:02 +03:00 committed by Milo Yip
parent 535636aeae
commit 9b5cad1649

View File

@ -1762,7 +1762,7 @@ struct TokenHelper {
template <typename Stack> template <typename Stack>
struct TokenHelper<Stack, char> { struct TokenHelper<Stack, char> {
RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) { RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) {
if (sizeof(SizeType) == 4) { RAPIDJSON_IF_CONSTEXPR (sizeof(SizeType) == 4) {
char *buffer = documentStack.template Push<char>(1 + 10); // '/' + uint char *buffer = documentStack.template Push<char>(1 + 10); // '/' + uint
*buffer++ = '/'; *buffer++ = '/';
const char* end = internal::u32toa(index, buffer); const char* end = internal::u32toa(index, buffer);