From 249529f0396e0d9182a51b00717d24b5902f9ebf Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Thu, 3 Jul 2014 16:52:49 +0200 Subject: [PATCH] avoid truncation warning on MSVC --- include/rapidjson/reader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h index 7edfad9..19b906d 100644 --- a/include/rapidjson/reader.h +++ b/include/rapidjson/reader.h @@ -224,7 +224,7 @@ inline const char *SkipWhitespace_SIMD(const char* p) { x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1)); x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2)); x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3)); - unsigned short r = ~_mm_movemask_epi8(x); + unsigned short r = (unsigned short)~_mm_movemask_epi8(x); if (r == 0) // all 16 characters are whitespace p += 16; else { // some of characters may be non-whitespace