Skip to content

Commit

Permalink
Merge pull request #201 from roehling/big_endian
Browse files Browse the repository at this point in the history
Properly check for Big Endian
  • Loading branch information
syoyo authored Aug 6, 2023
2 parents c319663 + ed3962f commit 79e5df5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tinyexr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 79e5df5

Please sign in to comment.