General: Be explicit about athena's Endian type

Allows this code to build if the enumeration is ever changed into a
strongly-typed enumeration.
This commit is contained in:
Lioncash 2019-09-14 10:49:15 -04:00
parent ce4144952b
commit aaf5bae201
4 changed files with 8 additions and 8 deletions

View File

@ -15,7 +15,7 @@ class MemoryReader;
namespace hecl::blender {
enum class BlendType;
struct SDNABlock : public athena::io::DNA<athena::Little> {
struct SDNABlock : public athena::io::DNA<athena::Endian::Little> {
AT_DECL_DNA
DNAFourCC magic;
DNAFourCC nameMagic;
@ -31,11 +31,11 @@ struct SDNABlock : public athena::io::DNA<athena::Little> {
Align<4> align3;
DNAFourCC strcMagic;
Value<atUint32> numStrcs;
struct SDNAStruct : public athena::io::DNA<athena::Little> {
struct SDNAStruct : public athena::io::DNA<athena::Endian::Little> {
AT_DECL_DNA
Value<atUint16> type;
Value<atUint16> numFields;
struct SDNAField : public athena::io::DNA<athena::Little> {
struct SDNAField : public athena::io::DNA<athena::Endian::Little> {
AT_DECL_DNA
Value<atUint16> type;
Value<atUint16> name;
@ -51,7 +51,7 @@ struct SDNABlock : public athena::io::DNA<athena::Little> {
const SDNAStruct* lookupStruct(const char* n, atUint32& idx) const;
};
struct FileBlock : public athena::io::DNA<athena::Little> {
struct FileBlock : public athena::io::DNA<athena::Endian::Little> {
AT_DECL_DNA
DNAFourCC type;
Value<atUint32> size;

View File

@ -28,14 +28,14 @@ enum EFlags {
};
ENABLE_BITWISE_ENUM(EFlags)
class CVar : public athena::io::DNA<athena::Big> {
class CVar : public athena::io::DNA<athena::Endian::Big> {
public:
AT_DECL_DNA
String<-1> m_name;
String<-1> m_value;
};
struct CVarContainer : public athena::io::DNA<athena::Big> {
struct CVarContainer : public athena::io::DNA<athena::Endian::Big> {
AT_DECL_DNA
Value<atUint32> magic = 'CVAR';
Value<atUint32> cvarCount;

View File

@ -53,7 +53,7 @@ public:
};
#define FOURCC(chars) FourCC(SBIG(chars))
using BigDNA = athena::io::DNA<athena::Big>;
using BigDNA = athena::io::DNA<athena::Endian::Big>;
/** FourCC with DNA read/write */
class DNAFourCC final : public BigDNA, public FourCC {

View File

@ -11,7 +11,7 @@ enum class HMDLTopology : atUint32 {
#define HECL_HMDL_META_SZ 32
struct HMDLMeta : athena::io::DNA<athena::Big> {
struct HMDLMeta : athena::io::DNA<athena::Endian::Big> {
AT_DECL_DNA
Value<atUint32> magic = 'TACO';
Value<HMDLTopology> topology;