From 6e6a82fd66c90b32a74163bce4d1f0c7602f8699 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 24 Dec 2021 14:36:40 +0100 Subject: [PATCH] :rotating_light: fix warnings --- test/src/unit-byte_container_with_subtype.cpp | 6 +++--- test/src/unit-hash.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/src/unit-byte_container_with_subtype.cpp b/test/src/unit-byte_container_with_subtype.cpp index 51ce9c0f4..9ff8ee9e9 100644 --- a/test/src/unit-byte_container_with_subtype.cpp +++ b/test/src/unit-byte_container_with_subtype.cpp @@ -41,11 +41,11 @@ TEST_CASE("byte_container_with_subtype") nlohmann::byte_container_with_subtype> container; CHECK(!container.has_subtype()); - CHECK(container.subtype() == subtype_type(-1)); + CHECK(container.subtype() == static_cast(-1)); container.clear_subtype(); CHECK(!container.has_subtype()); - CHECK(container.subtype() == subtype_type(-1)); + CHECK(container.subtype() == static_cast(-1)); container.set_subtype(42); CHECK(container.has_subtype()); @@ -60,7 +60,7 @@ TEST_CASE("byte_container_with_subtype") container.clear_subtype(); CHECK(!container.has_subtype()); - CHECK(container.subtype() == subtype_type(-1)); + CHECK(container.subtype() == static_cast(-1)); } SECTION("comparisons") diff --git a/test/src/unit-hash.cpp b/test/src/unit-hash.cpp index 7abec52d1..dc0614ae0 100644 --- a/test/src/unit-hash.cpp +++ b/test/src/unit-hash.cpp @@ -56,7 +56,7 @@ TEST_CASE("hash") // number hashes.insert(std::hash {}(json(0))); - hashes.insert(std::hash {}(json(unsigned(0)))); + hashes.insert(std::hash {}(json(static_cast(0)))); hashes.insert(std::hash {}(json(-1))); hashes.insert(std::hash {}(json(0.0))); @@ -105,7 +105,7 @@ TEST_CASE("hash") // number hashes.insert(std::hash {}(ordered_json(0))); - hashes.insert(std::hash {}(ordered_json(unsigned(0)))); + hashes.insert(std::hash {}(ordered_json(static_cast(0)))); hashes.insert(std::hash {}(ordered_json(-1))); hashes.insert(std::hash {}(ordered_json(0.0)));