From e7f17d56c2711401c9a2a2196b5270ad342b8ce0 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 28 Mar 2020 18:10:55 -1000 Subject: [PATCH] Add IStreamReader overloaded constructor to DNAFourCC --- hecl/include/hecl/FourCC.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hecl/include/hecl/FourCC.hpp b/hecl/include/hecl/FourCC.hpp index 0f426c441..24a0f6799 100644 --- a/hecl/include/hecl/FourCC.hpp +++ b/hecl/include/hecl/FourCC.hpp @@ -59,10 +59,11 @@ using BigDNA = athena::io::DNA; /** FourCC with DNA read/write */ class DNAFourCC final : public BigDNA, public FourCC { public: - constexpr DNAFourCC() : FourCC() {} - constexpr DNAFourCC(const FourCC& other) : FourCC() { num = other.toUint32(); } - constexpr DNAFourCC(const char* name) : FourCC(name) {} - constexpr DNAFourCC(uint32_t n) : FourCC(n) {} + constexpr DNAFourCC() noexcept : FourCC() {} + constexpr DNAFourCC(const FourCC& other) noexcept : FourCC(other) {} + constexpr DNAFourCC(const char* name) noexcept : FourCC(name) {} + constexpr DNAFourCC(uint32_t n) noexcept : FourCC(n) {} + constexpr DNAFourCC(athena::io::IStreamReader& r) { read(r); } AT_DECL_EXPLICIT_DNA_YAML }; template <>