Add IStreamReader overloaded constructor to DNAFourCC

This commit is contained in:
Jack Andersen 2020-03-28 18:10:55 -10:00
parent 7b63b8e197
commit e7f17d56c2
1 changed files with 5 additions and 4 deletions

View File

@ -59,10 +59,11 @@ using BigDNA = athena::io::DNA<athena::Endian::Big>;
/** FourCC with DNA read/write */ /** FourCC with DNA read/write */
class DNAFourCC final : public BigDNA, public FourCC { class DNAFourCC final : public BigDNA, public FourCC {
public: public:
constexpr DNAFourCC() : FourCC() {} constexpr DNAFourCC() noexcept : FourCC() {}
constexpr DNAFourCC(const FourCC& other) : FourCC() { num = other.toUint32(); } constexpr DNAFourCC(const FourCC& other) noexcept : FourCC(other) {}
constexpr DNAFourCC(const char* name) : FourCC(name) {} constexpr DNAFourCC(const char* name) noexcept : FourCC(name) {}
constexpr DNAFourCC(uint32_t n) : FourCC(n) {} constexpr DNAFourCC(uint32_t n) noexcept : FourCC(n) {}
constexpr DNAFourCC(athena::io::IStreamReader& r) { read(r); }
AT_DECL_EXPLICIT_DNA_YAML AT_DECL_EXPLICIT_DNA_YAML
}; };
template <> template <>