Added ByteSwap macros for BigEndian platforms

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@78 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2008-08-07 20:50:22 +00:00
parent 2f36cc5f5f
commit e009d43e3f
1 changed files with 19 additions and 0 deletions

View File

@ -124,5 +124,24 @@ public:
};
};
// byteswap macros for BigEndian support
#if (defined AI_BUILD_BIG_ENDIAN)
# define AI_SWAP2(p) ByteSwap::Swap2((char*)&(p))
# define AI_SWAP4(p) ByteSwap::Swap4((char*)&(p))
# define AI_SWAP8(p) ByteSwap::Swap8((char*)&(p))
# define AI_SWAP2P(p) ByteSwap::Swap2((char*)(p))
# define AI_SWAP4P(p) ByteSwap::Swap4((char*)(p))
# define AI_SWAP8P(p) ByteSwap::Swap8((char*)(p))
# define BE_NCONST
#else
# define AI_SWAP2(p)
# define AI_SWAP4(p)
# define AI_SWAP8(p)
# define AI_SWAP2P(p)
# define AI_SWAP4P(p)
# define AI_SWAP8P(p)
# define BE_NCONST const
#endif
#endif //!! AI_BYTESWAP_H_INC