From 68b780fa37fd7b18f1442cc021f3e22679677c3b Mon Sep 17 00:00:00 2001 From: "Harold Pratt (HAL)" Date: Mon, 25 Jul 2022 10:34:20 -0700 Subject: [PATCH] Two small fixes: 1. memcpy is declared in ; make sure to include it if needed 2. asFloat's __cpp_lib_bit_cast was using the wrong name for its parameter (the param was renamed after testing and I never rebuilt) with `__cpp_lib_bit_cast` on. Oops :-( --- yoga/CompactValue.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yoga/CompactValue.h b/yoga/CompactValue.h index 510e993a..1ed0a74b 100644 --- a/yoga/CompactValue.h +++ b/yoga/CompactValue.h @@ -11,6 +11,8 @@ #ifdef __cpp_lib_bit_cast #include +#else +#include #endif #include "YGValue.h" #include "YGMacros.h" @@ -169,7 +171,7 @@ private: static float asFloat(uint32_t u) { #ifdef __cpp_lib_bit_cast - return std::bit_cast(data); + return std::bit_cast(u); #else float f; static_assert(sizeof(f) == sizeof(u), "uint32_t and float must have the same size");