From 00c95e5c94b84bbf85c20ab81ef903160389a216 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 31 Oct 2023 19:56:41 +0100 Subject: [PATCH] :rotating_light: suppress warnings --- tests/src/unit-udt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/unit-udt.cpp b/tests/src/unit-udt.cpp index a0260f59d..d08c427b1 100644 --- a/tests/src/unit-udt.cpp +++ b/tests/src/unit-udt.cpp @@ -566,7 +566,7 @@ struct pod_serializer // calling get calls from_json, for now, we cannot do this in custom // serializers nlohmann::from_json(j, value); - auto* bytes = static_cast(static_cast(&value)); + auto* bytes = static_cast(static_cast(&value)); // NOLINT(bugprone-casting-through-void) std::memcpy(&t, bytes, sizeof(value)); } @@ -585,7 +585,7 @@ struct pod_serializer std::is_pod::value && std::is_class::value, int >::type = 0 > static void to_json(BasicJsonType& j, const T& t) noexcept { - const auto* bytes = static_cast< const unsigned char*>(static_cast(&t)); + const auto* bytes = static_cast< const unsigned char*>(static_cast(&t)); // NOLINT(bugprone-casting-through-void) std::uint64_t value = 0; std::memcpy(&value, bytes, sizeof(value)); nlohmann::to_json(j, value);