diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h index 7bcb95f9..4e0f7399 100644 --- a/ebml/EbmlElement.h +++ b/ebml/EbmlElement.h @@ -254,7 +254,14 @@ extern const EbmlSemanticContext Context_EbmlGlobal; */ class EBML_DLL_API EbmlCallbacks { public: - EbmlCallbacks(EbmlElement & (*Creator)(), const EbmlId & aGlobalId, const char * aDebugName, const EbmlSemanticContext & aContext); + constexpr EbmlCallbacks(EbmlElement & (*Creator)(), const EbmlId & aGlobalId, const char * aDebugName, const EbmlSemanticContext & aContext) + :Create(Creator) + ,GlobalId(aGlobalId) + ,DebugName(aDebugName) + ,Context(aContext) + { + assert(Creator!=nullptr); + } inline const EbmlId & ClassId() const { return GlobalId; } inline const EbmlSemanticContext & GetContext() const { return Context; } diff --git a/src/EbmlElement.cpp b/src/EbmlElement.cpp index ec6ad688..324ef015 100644 --- a/src/EbmlElement.cpp +++ b/src/EbmlElement.cpp @@ -211,15 +211,6 @@ std::int64_t ReadCodedSizeSignedValue(const binary * InBuffer, std::uint32_t & B } -EbmlCallbacks::EbmlCallbacks(EbmlElement & (*Creator)(), const EbmlId & aGlobalId, const char * aDebugName, const EbmlSemanticContext & aContext) - :Create(Creator) - ,GlobalId(aGlobalId) - ,DebugName(aDebugName) - ,Context(aContext) -{ - assert(Create!=nullptr); -} - const EbmlSemantic & EbmlSemanticContext::GetSemantic(std::size_t i) const { assert(i