From 1b940e912ca2bff6c794c121a6e2ce1485b5be12 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Sun, 14 Jan 2024 08:49:50 +0100 Subject: [PATCH] remove the MasterContext from EbmlMaster It must always be the ClassInfos Context. This the case for all macros. So we don't need to store it a second time. --- src/KaxAttached.cpp | 2 +- src/KaxAttachments.cpp | 2 +- src/KaxBlock.cpp | 2 +- src/KaxCluster.cpp | 2 +- src/KaxSegment.cpp | 2 +- src/KaxTracks.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/KaxAttached.cpp b/src/KaxAttached.cpp index 777ad245..cc25e295 100644 --- a/src/KaxAttached.cpp +++ b/src/KaxAttached.cpp @@ -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) } diff --git a/src/KaxAttachments.cpp b/src/KaxAttachments.cpp index dcd333f1..9f3271b5 100644 --- a/src/KaxAttachments.cpp +++ b/src/KaxAttachments.cpp @@ -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) } diff --git a/src/KaxBlock.cpp b/src/KaxBlock.cpp index 2753471b..451d91af 100644 --- a/src/KaxBlock.cpp +++ b/src/KaxBlock.cpp @@ -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; diff --git a/src/KaxCluster.cpp b/src/KaxCluster.cpp index 7bef80fe..be5a3cf1 100644 --- a/src/KaxCluster.cpp +++ b/src/KaxCluster.cpp @@ -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) diff --git a/src/KaxSegment.cpp b/src/KaxSegment.cpp index 5fa4faad..f0b1ca89 100644 --- a/src/KaxSegment.cpp +++ b/src/KaxSegment.cpp @@ -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 diff --git a/src/KaxTracks.cpp b/src/KaxTracks.cpp index 014f06f3..1de990bb 100644 --- a/src/KaxTracks.cpp +++ b/src/KaxTracks.cpp @@ -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)