Make an actual enum type for endianness.

This commit is contained in:
Aaron Giles 2010-01-20 17:24:42 +00:00
parent 87e0102733
commit c6cd01a95d

View File

@ -144,15 +144,18 @@ union PAIR64
***************************************************************************/ ***************************************************************************/
// constants for expression endianness // constants for expression endianness
#define ENDIANNESS_LITTLE 0 enum endianness_t
#define ENDIANNESS_BIG 1 {
ENDIANNESS_LITTLE,
ENDIANNESS_BIG
};
// declare native endianness to be one or the other // declare native endianness to be one or the other
#ifdef LSB_FIRST #ifdef LSB_FIRST
#define ENDIANNESS_NATIVE ENDIANNESS_LITTLE const endianness_t ENDIANNESS_NATIVE = ENDIANNESS_LITTLE;
#else #else
#define ENDIANNESS_NATIVE ENDIANNESS_BIG const endianness_t ENDIANNESS_NATIVE = ENDIANNESS_BIG;
#endif #endif
@ -179,7 +182,7 @@ union PAIR64
COMMON MACROS COMMON MACROS
***************************************************************************/ ***************************************************************************/
// more for defining a copy constructor and assignment operator to prevent copying // macro for defining a copy constructor and assignment operator to prevent copying
#define DISABLE_COPYING(_Type) \ #define DISABLE_COPYING(_Type) \
private: \ private: \
_Type(const _Type &); \ _Type(const _Type &); \