From 496f14c4f56c17af456d6bfe0f8525b478520dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 4 Feb 2025 10:14:52 -0600 Subject: [PATCH] Fix another false-ish positive --- Common/Math/math_util.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Common/Math/math_util.h b/Common/Math/math_util.h index 6cd9e711d2..033e48ba90 100644 --- a/Common/Math/math_util.h +++ b/Common/Math/math_util.h @@ -9,18 +9,10 @@ typedef unsigned short float16; -// This ain't a 1.5.10 float16, it's a stupid hack format where we chop 16 bits off a float. -// This choice is subject to change. Don't think I'm using this for anything at all now anyway. -// DEPRECATED -inline float16 FloatToFloat16(float x) { - int ix; - memcpy(&ix, &x, sizeof(float)); - return ix >> 16; -} - inline float Float16ToFloat(float16 ix) { + uint32_t extended = ix; float x; - memcpy(&x, &ix, sizeof(float)); + memcpy(&x, &extended, sizeof(float)); return x; }