Skip to content

Commit

Permalink
remove EbmlDummy default constructor
Browse files Browse the repository at this point in the history
The whole point of EbmlDummy is to be a placeholder for elements with an unknown EBML ID.
It should not exist with a fake ID not corresponding to something read.
The current API makes some default creation mandatory but with don't have to allow
a local creation on top of that.
  • Loading branch information
robUx4 committed Dec 26, 2023
1 parent b4fa4d9 commit e210d52
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ebml/EbmlDummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace libebml {

class EBML_DLL_API EbmlDummy : public EbmlBinary {
public:
EbmlDummy() : EbmlBinary(EbmlDummy::ClassInfos), DummyId(DummyRawId) {}
EbmlDummy(const EbmlId & aId) : EbmlBinary(EbmlDummy::ClassInfos), DummyId(aId) {}

bool IsDummy() const override {return true;}
Expand All @@ -29,7 +28,7 @@ class EBML_DLL_API EbmlDummy : public EbmlBinary {
EbmlElement & CreateElement() const override { return Create(); }
EbmlElement * Clone() const override { return new EbmlDummy(DummyId); }

static EbmlElement & Create() { return *(new EbmlDummy); }
static EbmlElement & Create() { return *(new EbmlDummy(DummyRawId)); }
static const EbmlId & ClassId() { return DummyRawId; };
static const EbmlCallbacks ClassInfos;

Expand Down

0 comments on commit e210d52

Please sign in to comment.