🚨 suppress warnings
This commit is contained in:
parent
cdb29069da
commit
00c95e5c94
@ -566,7 +566,7 @@ struct pod_serializer
|
|||||||
// calling get calls from_json, for now, we cannot do this in custom
|
// calling get calls from_json, for now, we cannot do this in custom
|
||||||
// serializers
|
// serializers
|
||||||
nlohmann::from_json(j, value);
|
nlohmann::from_json(j, value);
|
||||||
auto* bytes = static_cast<char*>(static_cast<void*>(&value));
|
auto* bytes = static_cast<char*>(static_cast<void*>(&value)); // NOLINT(bugprone-casting-through-void)
|
||||||
std::memcpy(&t, bytes, sizeof(value));
|
std::memcpy(&t, bytes, sizeof(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ struct pod_serializer
|
|||||||
std::is_pod<U>::value && std::is_class<U>::value, int >::type = 0 >
|
std::is_pod<U>::value && std::is_class<U>::value, int >::type = 0 >
|
||||||
static void to_json(BasicJsonType& j, const T& t) noexcept
|
static void to_json(BasicJsonType& j, const T& t) noexcept
|
||||||
{
|
{
|
||||||
const auto* bytes = static_cast< const unsigned char*>(static_cast<const void*>(&t));
|
const auto* bytes = static_cast< const unsigned char*>(static_cast<const void*>(&t)); // NOLINT(bugprone-casting-through-void)
|
||||||
std::uint64_t value = 0;
|
std::uint64_t value = 0;
|
||||||
std::memcpy(&value, bytes, sizeof(value));
|
std::memcpy(&value, bytes, sizeof(value));
|
||||||
nlohmann::to_json(j, value);
|
nlohmann::to_json(j, value);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user