Fixed format.h(2351,1): warning C4127: conditional expression is constant
This commit is contained in:
parent
a844d7ab81
commit
9e2e299c5a
@ -2348,7 +2348,12 @@ template <typename SpecHandler, typename Char> struct precision_adapter {
|
|||||||
|
|
||||||
template <typename Char>
|
template <typename Char>
|
||||||
FMT_CONSTEXPR const Char* next_code_point(const Char* begin, const Char* end) {
|
FMT_CONSTEXPR const Char* next_code_point(const Char* begin, const Char* end) {
|
||||||
|
|
||||||
|
#ifdef __cpp_if_constexpr
|
||||||
|
if (constexpr (sizeof(Char) != 1) || (*begin & 0x80) == 0) return begin + 1;
|
||||||
|
#else
|
||||||
if (sizeof(Char) != 1 || (*begin & 0x80) == 0) return begin + 1;
|
if (sizeof(Char) != 1 || (*begin & 0x80) == 0) return begin + 1;
|
||||||
|
#endif
|
||||||
do {
|
do {
|
||||||
++begin;
|
++begin;
|
||||||
} while (begin != end && (*begin & 0xc0) == 0x80);
|
} while (begin != end && (*begin & 0xc0) == 0x80);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user