Skip to content

Commit

Permalink
Merge remote-tracking branch 'robux4/default_impl'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbunkus committed Jan 7, 2024
2 parents 3a1757e + 3a1e6dd commit f4d7104
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 0 additions & 2 deletions ebml/EbmlDummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class EBML_DLL_API EbmlDummy : public EbmlBinary {
return DummyId;
}

const EbmlSemanticContext &Context() const override;
const char *DebugName() const override { return "DummyElement"; }
EbmlElement & CreateElement() const override { return Create(); }
EbmlElement * Clone() const override { return new EbmlDummy(DummyId); }

Expand Down
9 changes: 3 additions & 6 deletions ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,6 @@ class DllApi x : public BaseClass { \

#define EBML_CONCRETE_CLASS(Type) \
public: \
const libebml::EbmlSemanticContext &Context() const override {return ClassInfos.GetContext();} \
const char *DebugName() const override {return ClassInfos.GetName();} \
libebml::EbmlId const &GetClassId() const override {return ClassInfos.ClassId();} \
libebml::EbmlElement & CreateElement() const override {return Create();} \
libebml::EbmlElement * Clone() const override { return new Type(*this); } \
static libebml::EbmlElement & Create() {return *(new Type);} \
Expand Down Expand Up @@ -429,10 +426,10 @@ class EBML_DLL_API EbmlElement {
*/
virtual EbmlElement * Clone() const = 0;

virtual EbmlId const &GetClassId() const = 0;
virtual EbmlId const &GetClassId() const {return ClassInfo.ClassId();}
virtual explicit operator const EbmlId &() const { return GetClassId(); }
virtual const char *DebugName() const = 0;
virtual const EbmlSemanticContext &Context() const = 0;
const char *DebugName() const {return ClassInfo.GetName();}
const EbmlSemanticContext &Context() const {return ClassInfo.GetContext();}
virtual EbmlElement & CreateElement() const = 0;

/*!
Expand Down
5 changes: 0 additions & 5 deletions src/EbmlDummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ DEFINE_EBML_CLASS_ORPHAN(EbmlDummy, 0xFF, 1, "DummyElement")

const EbmlId EbmlDummy::DummyRawId = Id_EbmlDummy;

const EbmlSemanticContext &EbmlDummy::Context() const
{
return Context_EbmlDummy;
}

} // namespace libebml

0 comments on commit f4d7104

Please sign in to comment.