From a76a3c584afa6ecceb5ce348f505e14939a8ea01 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Tue, 30 Jun 2015 19:09:35 -0700 Subject: [PATCH] * Revert swapFloat/Double "fixes" --- include/Athena/Utility.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/Athena/Utility.hpp b/include/Athena/Utility.hpp index ba2f2c9..2248b57 100644 --- a/include/Athena/Utility.hpp +++ b/include/Athena/Utility.hpp @@ -59,13 +59,13 @@ inline atInt64 swap64(atInt64 val) inline atUint64 swapU64(atUint64 val) {return (atUint64)swap64(val);} inline float swapFloat(float val) { - atInt32 ival = swap64(static_cast(val)); - return static_cast(ival); + atInt32 ival = swap32(*((atInt32*)(&val))); + return *((float*)(&ival)); } inline double swapDouble(double val) { - atInt64 ival = swap64(static_cast(val)); - return static_cast(ival); + atInt64 ival = swap64(*((atInt64*)(&val))); + return *((double*)(&ival)); } inline atInt16 LittleInt16(atInt16& val) {