mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
Fix build on big-endian platforms
GCC 8 complains that it can't find relevant functions: /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_png.cpp:669:42: error: call of overloaded 'BigLong(uint32_t)' is ambiguous chunklen = BigLong((unsigned int)x[1]); ^ In file included from /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_png.cpp:44: /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_swap.h:212:15: note: candidate: 'long unsigned int BigLong(long unsigned int)' <deleted> unsigned long BigLong(unsigned long) = delete; ^~~~~~~ /wrkdirs/usr/ports/games/gzdoom/work/gzdoom-g3.7.2/src/m_swap.h:213:6: note: candidate: 'long int BigLong(long int)' <deleted> long BigLong(long) = delete; This is on FreeBSD/powerpc64.
This commit is contained in:
parent
5c86a1e6b5
commit
a3541f853c
1 changed files with 10 additions and 0 deletions
|
@ -129,6 +129,16 @@ inline int BigLong(int &x)
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline unsigned int BigLong(unsigned int x)
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline int BigLong(int x)
|
||||||
|
{
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
inline short LittleShort(short x)
|
inline short LittleShort(short x)
|
||||||
|
|
Loading…
Reference in a new issue