From ed3962f24e958ac5e9d284b245fdc851909431a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20R=C3=B6hling?= Date: Tue, 31 Aug 2021 13:33:57 +0200 Subject: [PATCH] Properly check for Big Endian --- tinyexr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tinyexr.h b/tinyexr.h index e5ac54a..d34ab63 100644 --- a/tinyexr.h +++ b/tinyexr.h @@ -780,7 +780,7 @@ static void cpy2(unsigned short *dst_val, const unsigned short *src_val) { } static void swap2(unsigned short *val) { -#ifdef TINYEXR_LITTLE_ENDIAN +#if TINYEXR_LITTLE_ENDIAN (void)val; #else unsigned short tmp = *val; @@ -839,7 +839,7 @@ static void cpy4(float *dst_val, const float *src_val) { #endif static void swap4(unsigned int *val) { -#ifdef TINYEXR_LITTLE_ENDIAN +#if TINYEXR_LITTLE_ENDIAN (void)val; #else unsigned int tmp = *val; @@ -854,7 +854,7 @@ static void swap4(unsigned int *val) { } static void swap4(int *val) { -#ifdef TINYEXR_LITTLE_ENDIAN +#if TINYEXR_LITTLE_ENDIAN (void)val; #else int tmp = *val; @@ -869,7 +869,7 @@ static void swap4(int *val) { } static void swap4(float *val) { -#ifdef TINYEXR_LITTLE_ENDIAN +#if TINYEXR_LITTLE_ENDIAN (void)val; #else float tmp = *val; @@ -900,7 +900,7 @@ static void cpy8(tinyexr::tinyexr_uint64 *dst_val, const tinyexr::tinyexr_uint64 #endif static void swap8(tinyexr::tinyexr_uint64 *val) { -#ifdef TINYEXR_LITTLE_ENDIAN +#if TINYEXR_LITTLE_ENDIAN (void)val; #else tinyexr::tinyexr_uint64 tmp = (*val);