mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
fix C26451 warnning in serializer.hpp for VS2019
This commit is contained in:
@ -807,7 +807,9 @@ class serializer
|
|||||||
? (byte & 0x3fu) | (codep << 6u)
|
? (byte & 0x3fu) | (codep << 6u)
|
||||||
: (0xFFu >> type) & (byte);
|
: (0xFFu >> type) & (byte);
|
||||||
|
|
||||||
state = utf8d[256u + state * 16u + type];
|
std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
|
||||||
|
assert(0 <= index and index < 400);
|
||||||
|
state = utf8d[index];
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14552,7 +14552,9 @@ class serializer
|
|||||||
? (byte & 0x3fu) | (codep << 6u)
|
? (byte & 0x3fu) | (codep << 6u)
|
||||||
: (0xFFu >> type) & (byte);
|
: (0xFFu >> type) & (byte);
|
||||||
|
|
||||||
state = utf8d[256u + state * 16u + type];
|
std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
|
||||||
|
assert(0 <= index and index < 400);
|
||||||
|
state = utf8d[index];
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user