Fix clang compilation
This commit is contained in:
parent
a5990f3eea
commit
4f4aff329f
@ -855,6 +855,7 @@ private:
|
|||||||
// InsituStringStream -> InsituStringStream
|
// InsituStringStream -> InsituStringStream
|
||||||
static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {
|
static RAPIDJSON_FORCEINLINE void ScanCopyUnescapedString(InsituStringStream& is, InsituStringStream& os) {
|
||||||
RAPIDJSON_ASSERT(&is == &os);
|
RAPIDJSON_ASSERT(&is == &os);
|
||||||
|
(void)os;
|
||||||
|
|
||||||
if (is.src_ == is.dst_) {
|
if (is.src_ == is.dst_) {
|
||||||
SkipUnescapedString(is);
|
SkipUnescapedString(is);
|
||||||
@ -867,8 +868,11 @@ private:
|
|||||||
// Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
|
// Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
|
||||||
const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
|
const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
|
||||||
while (p != nextAligned)
|
while (p != nextAligned)
|
||||||
if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20))
|
if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
|
||||||
goto exit;
|
is.src_ = p;
|
||||||
|
is.dst_ = q;
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
*q++ = *p++;
|
*q++ = *p++;
|
||||||
|
|
||||||
@ -903,7 +907,6 @@ private:
|
|||||||
_mm_storeu_si128(reinterpret_cast<__m128i *>(q), s);
|
_mm_storeu_si128(reinterpret_cast<__m128i *>(q), s);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
|
||||||
is.src_ = p;
|
is.src_ = p;
|
||||||
is.dst_ = q;
|
is.dst_ = q;
|
||||||
}
|
}
|
||||||
@ -915,10 +918,11 @@ exit:
|
|||||||
|
|
||||||
// Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
|
// Scan one by one until alignment (unaligned load may cross page boundary and cause crash)
|
||||||
const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
|
const char* nextAligned = reinterpret_cast<const char*>((reinterpret_cast<size_t>(p) + 15) & static_cast<size_t>(~15));
|
||||||
bool found = false;
|
|
||||||
for (; p != nextAligned; p++)
|
for (; p != nextAligned; p++)
|
||||||
if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20))
|
if (RAPIDJSON_UNLIKELY(*p == '\"') || RAPIDJSON_UNLIKELY(*p == '\\') || RAPIDJSON_UNLIKELY(static_cast<unsigned>(*p) < 0x20)) {
|
||||||
goto exit;
|
is.src_ = is.dst_ = p;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// The rest of string using SIMD
|
// The rest of string using SIMD
|
||||||
static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
|
static const char dquote[16] = { '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"', '\"' };
|
||||||
@ -949,7 +953,6 @@ exit:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
|
||||||
is.src_ = is.dst_ = p;
|
is.src_ = is.dst_ = p;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user