From 81446fdc539d95d1f23e32d2a8cbb87d83717ce1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 25 Jul 2016 22:56:34 +0300 Subject: FULLPIPE: Streamlined double binary numbers loading --- engines/fullpipe/utils.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 0cc8bd83f4..a7dee2e59c 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -262,15 +262,11 @@ double MfcArchive::readDouble() { // http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/ union { - struct { - int32 a; - int32 b; - } i; + byte b[8]; double d; } tmp; - tmp.i.a = readUint32LE(); - tmp.i.b = readUint32LE(); + read(&tmp.b, 8); return tmp.d; } -- cgit v1.2.3