General: Be explicit about the Endian type

This commit is contained in:
Lioncash 2019-09-09 20:35:41 -04:00
parent d5e91ca0fe
commit 71eb499270
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#include <athena/DNAYaml.hpp>
using namespace athena;
typedef io::DNA<Big> BigDNA;
typedef io::DNA<Endian::Big> BigDNA;
enum ETest : atUint8 { ZERO, ONE, TWO, THREE };
@ -54,7 +54,7 @@ struct AT_SPECIALIZE_PARMS(atUint16, 42, atUint32, 87, atUint32, 2) TESTFile : p
Value<TESTTemplateSubFile<atInt32, 36>> nestedTemplate1;
Value<TESTTemplateSubFile<atInt64, 96>> nestedTemplate2;
Value<atUint32, Little> arrCount[2];
Value<atUint32, Endian::Little> arrCount[2];
Vector<atUint32, AT_DNA_COUNT(arrCount[0])> array;
Value<atUint32> arrAltCount;

View File

@ -16,8 +16,8 @@ constexpr bool isSystemBigEndian() { return false; }
#else
constexpr bool isSystemBigEndian() { return __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__; }
#endif
constexpr ::athena::Endian SystemEndian = isSystemBigEndian() ? Big : Little;
constexpr ::athena::Endian NotSystemEndian = isSystemBigEndian() ? Little : Big;
constexpr ::athena::Endian SystemEndian = isSystemBigEndian() ? ::athena::Endian::Big : ::athena::Endian::Little;
constexpr ::athena::Endian NotSystemEndian = isSystemBigEndian() ? ::athena::Endian::Little : ::athena::Endian::Big;
#if _MSC_VER
#define BSWAP_CONSTEXPR inline