1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-25 13:41:56 +03:00

🚧 fixed more warnings

This commit is contained in:
Niels Lohmann
2017-02-22 18:14:29 +01:00
parent 345a106d73
commit 8cec55a271
10 changed files with 82 additions and 30 deletions

View File

@ -342,7 +342,7 @@ TEST_CASE("MessagePack")
const auto result = json::to_msgpack(j);
CHECK(result == expected);
int16_t restored = (result[1] << 8) + result[2];
int16_t restored = static_cast<int16_t>((result[1] << 8) + result[2]);
CHECK(restored == -9263);
// roundtrip
@ -374,7 +374,7 @@ TEST_CASE("MessagePack")
// check individual bytes
CHECK(result[0] == 0xd1);
int16_t restored = (result[1] << 8) + result[2];
int16_t restored = static_cast<int16_t>((result[1] << 8) + result[2]);
CHECK(restored == i);
// roundtrip