From 9b5cad1649f0108d1c2025ea11d77da78ba53d01 Mon Sep 17 00:00:00 2001 From: SilverPlate3 <93097769+SilverPlate3@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:20:02 +0300 Subject: [PATCH] Cpp version depended if constexpr schema.h Fix windows compile warning C4127 --- include/rapidjson/schema.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 02a6d0f..e28ddf7 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -1762,7 +1762,7 @@ struct TokenHelper { template struct TokenHelper { RAPIDJSON_FORCEINLINE static void AppendIndexToken(Stack& documentStack, SizeType index) { - if (sizeof(SizeType) == 4) { + RAPIDJSON_IF_CONSTEXPR (sizeof(SizeType) == 4) { char *buffer = documentStack.template Push(1 + 10); // '/' + uint *buffer++ = '/'; const char* end = internal::u32toa(index, buffer);