mirror of
https://github.com/nlohmann/json.git
synced 2024-12-01 03:11:05 +08:00
🚧 fixing warning C4267 (#453)
This commit is contained in:
parent
057b1e606b
commit
0200f2dc62
@ -7046,7 +7046,7 @@ class basic_json
|
||||
const auto N = j.m_value.string->size();
|
||||
if (N <= 0x17)
|
||||
{
|
||||
v.push_back(0x60 + N); // 1 byte for string + size
|
||||
v.push_back(0x60 + static_cast<uint8_t>(N)); // 1 byte for string + size
|
||||
}
|
||||
else if (N <= 0xff)
|
||||
{
|
||||
@ -7082,7 +7082,7 @@ class basic_json
|
||||
const auto N = j.m_value.array->size();
|
||||
if (N <= 0x17)
|
||||
{
|
||||
v.push_back(0x80 + N); // 1 byte for array + size
|
||||
v.push_back(0x80 + static_cast<uint8_t>(N)); // 1 byte for array + size
|
||||
}
|
||||
else if (N <= 0xff)
|
||||
{
|
||||
@ -7120,7 +7120,7 @@ class basic_json
|
||||
const auto N = j.m_value.object->size();
|
||||
if (N <= 0x17)
|
||||
{
|
||||
v.push_back(0xa0 + N); // 1 byte for object + size
|
||||
v.push_back(0xa0 + static_cast<uint8_t>(N)); // 1 byte for object + size
|
||||
}
|
||||
else if (N <= 0xff)
|
||||
{
|
||||
|
@ -7046,7 +7046,7 @@ class basic_json
|
||||
const auto N = j.m_value.string->size();
|
||||
if (N <= 0x17)
|
||||
{
|
||||
v.push_back(0x60 + N); // 1 byte for string + size
|
||||
v.push_back(0x60 + static_cast<uint8_t>(N)); // 1 byte for string + size
|
||||
}
|
||||
else if (N <= 0xff)
|
||||
{
|
||||
@ -7082,7 +7082,7 @@ class basic_json
|
||||
const auto N = j.m_value.array->size();
|
||||
if (N <= 0x17)
|
||||
{
|
||||
v.push_back(0x80 + N); // 1 byte for array + size
|
||||
v.push_back(0x80 + static_cast<uint8_t>(N)); // 1 byte for array + size
|
||||
}
|
||||
else if (N <= 0xff)
|
||||
{
|
||||
@ -7120,7 +7120,7 @@ class basic_json
|
||||
const auto N = j.m_value.object->size();
|
||||
if (N <= 0x17)
|
||||
{
|
||||
v.push_back(0xa0 + N); // 1 byte for object + size
|
||||
v.push_back(0xa0 + static_cast<uint8_t>(N)); // 1 byte for object + size
|
||||
}
|
||||
else if (N <= 0xff)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user