Skip to content

Commit

Permalink
handle a default value for dates
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Dec 17, 2023
1 parent f713dd1 commit 271c128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ class EBML_DLL_API EbmlSemantic {
NO_DEFAULT,
UINTEGER,
SINTEGER,
DATE,
DOUBLE,
STRING,
UNISTRING,
Expand All @@ -371,7 +372,7 @@ class EBML_DLL_API EbmlSemantic {
constexpr DefaultValues(void) : u64(0), type(DefaultType::NO_DEFAULT) {}
constexpr DefaultValues(const DefaultValues &) = default;
constexpr DefaultValues(std::uint64_t u) : u64(u), type(DefaultType::UINTEGER) {}
constexpr DefaultValues(std::int64_t u) : u64(u), type(DefaultType::UINTEGER) {}
constexpr DefaultValues(std::int64_t u, bool date = false) : i64(u), type(date ? DefaultType::UINTEGER : DefaultType::DATE) {}
constexpr DefaultValues(double d) : f(d), type(DefaultType::DOUBLE) {}
constexpr DefaultValues(const char *d) : s(d), type(DefaultType::STRING) {}
constexpr DefaultValues(const wchar_t *d) : ws(d), type(DefaultType::UNISTRING) {}
Expand Down

0 comments on commit 271c128

Please sign in to comment.