From d5e91ca0fee3e41aba0e7b5688d12f113efe45da Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 9 Sep 2019 20:32:00 -0400 Subject: [PATCH 1/2] General: Be explicit about the SeekOrigin type --- atdna/test.hpp | 2 +- include/athena/DNAOp.hpp | 2 +- include/athena/DNAYaml.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atdna/test.hpp b/atdna/test.hpp index 608c2b1..238fb92 100644 --- a/atdna/test.hpp +++ b/atdna/test.hpp @@ -60,7 +60,7 @@ struct AT_SPECIALIZE_PARMS(atUint16, 42, atUint32, 87, atUint32, 2) TESTFile : p Value arrAltCount; Vector arrayAlt; - Seek<21, Current> seek; + Seek<21, SeekOrigin::Current> seek; Value arrCount2; Vector, AT_DNA_COUNT(arrCount[1] + arrCount2)> array2; diff --git a/include/athena/DNAOp.hpp b/include/athena/DNAOp.hpp index f777863..bb10f83 100644 --- a/include/athena/DNAOp.hpp +++ b/include/athena/DNAOp.hpp @@ -372,7 +372,7 @@ struct Read { } static void DoSeek(atInt64 amount, SeekOrigin whence, StreamT& r) { r.seek(amount, whence); } static void DoAlign(atInt64 amount, StreamT& r) { - r.seek((r.position() + amount - 1) / amount * amount, athena::Begin); + r.seek((r.position() + amount - 1) / amount * amount, athena::SeekOrigin::Begin); } }; #define __READ_S(type, endian) \ diff --git a/include/athena/DNAYaml.hpp b/include/athena/DNAYaml.hpp index 4713b14..e2e4e9d 100644 --- a/include/athena/DNAYaml.hpp +++ b/include/athena/DNAYaml.hpp @@ -116,7 +116,7 @@ bool ValidateFromYAMLStream(athena::io::IStreamReader& fin) { atUint64 pos = fin.position(); yaml_parser_set_input(reader.getParser(), (yaml_read_handler_t*)YAMLAthenaReader, &fin); bool retval = reader.ValidateClassType(DNASubtype::DNAType()); - fin.seek(pos, athena::Begin); + fin.seek(pos, athena::SeekOrigin::Begin); return retval; } From 71eb4992701973cf7252f5ff7ec788e260f2309d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 9 Sep 2019 20:35:41 -0400 Subject: [PATCH 2/2] General: Be explicit about the Endian type --- atdna/test.hpp | 4 ++-- include/athena/Utility.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atdna/test.hpp b/atdna/test.hpp index 238fb92..f92d211 100644 --- a/atdna/test.hpp +++ b/atdna/test.hpp @@ -1,7 +1,7 @@ #include using namespace athena; -typedef io::DNA BigDNA; +typedef io::DNA 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> nestedTemplate1; Value> nestedTemplate2; - Value arrCount[2]; + Value arrCount[2]; Vector array; Value arrAltCount; diff --git a/include/athena/Utility.hpp b/include/athena/Utility.hpp index 2242626..81e118b 100644 --- a/include/athena/Utility.hpp +++ b/include/athena/Utility.hpp @@ -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