Skip to content

Commit

Permalink
remove the MasterContext from EbmlMaster
Browse files Browse the repository at this point in the history
It must always be the ClassInfos Context. This the case for all macros.
So we don't need to store it a second time.
  • Loading branch information
robUx4 committed Jan 14, 2024
1 parent 570f079 commit 1b940e9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/KaxAttached.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace libebml;
namespace libmatroska {

KaxAttached::KaxAttached()
:EbmlMaster(KaxAttached::ClassInfos, EBML_CLASS_SEMCONTEXT(KaxAttached))
:EbmlMaster(KaxAttached::ClassInfos)
{
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
}
Expand Down
2 changes: 1 addition & 1 deletion src/KaxAttachments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using namespace libebml;
namespace libmatroska {

KaxAttachments::KaxAttachments()
:EbmlMaster(KaxAttachments::ClassInfos, EBML_CLASS_SEMCONTEXT(KaxAttachments))
:EbmlMaster(KaxAttachments::ClassInfos)
{
SetSizeLength(2); // mandatory min size support (for easier updating) (2^(7*2)-2 = 16Ko)
}
Expand Down
2 changes: 1 addition & 1 deletion src/KaxBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ KaxInternalBlock::KaxInternalBlock(const KaxInternalBlock & ElementToClone)
} */

KaxBlockGroup::KaxBlockGroup()
:EbmlMaster(KaxBlockGroup::ClassInfos, EBML_CLASS_SEMCONTEXT(KaxBlockGroup))
:EbmlMaster(KaxBlockGroup::ClassInfos)
{}

static constexpr std::int64_t SignedVINT_Shift1 = (1 << ((7*1) - 1)) - 1;
Expand Down
2 changes: 1 addition & 1 deletion src/KaxCluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace libebml;
namespace libmatroska {

KaxCluster::KaxCluster()
:EbmlMaster(KaxCluster::ClassInfos, EBML_CLASS_SEMCONTEXT(KaxCluster))
:EbmlMaster(KaxCluster::ClassInfos)
{}

KaxCluster::KaxCluster(const KaxCluster & ElementToClone)
Expand Down
2 changes: 1 addition & 1 deletion src/KaxSegment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace libebml;
namespace libmatroska {

KaxSegment::KaxSegment()
:EbmlMaster(KaxSegment::ClassInfos, EBML_CLASS_SEMCONTEXT(KaxSegment))
:EbmlMaster(KaxSegment::ClassInfos)
{
SetSizeLength(5); // mandatory min size support (for easier updating) (2^(7*5)-2 = 32Go)
SetSizeInfinite(); // by default a segment is big and the size is unknown in advance
Expand Down
2 changes: 1 addition & 1 deletion src/KaxTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace libebml;
namespace libmatroska {

KaxTrackEntry::KaxTrackEntry()
:EbmlMaster(KaxTrackEntry::ClassInfos, EBML_CLASS_SEMCONTEXT(KaxTrackEntry))
:EbmlMaster(KaxTrackEntry::ClassInfos)
{}

void KaxTrackEntry::EnableLacing(bool bEnable)
Expand Down

0 comments on commit 1b940e9

Please sign in to comment.