Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use assignment by reference instead of pointers #133

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/KaxBlockData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void KaxReferenceBlock::SetReferencedBlock(const KaxBlockGroup & aRefdBlock)
{
FreeBlob();
auto block_blob = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
block_blob->SetBlockGroup(*const_cast<KaxBlockGroup*>(&aRefdBlock));
block_blob->SetBlockGroup(const_cast<KaxBlockGroup &>(aRefdBlock));
RefdBlock = block_blob;
bOurBlob = true;
SetValueIsSet();
Expand Down
2 changes: 1 addition & 1 deletion src/KaxCues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool KaxCues::AddBlockGroup(const KaxBlockGroup & BlockRef)
// Do not add the element if it's already present.
std::vector<const KaxBlockBlob *>::iterator ListIdx;
KaxBlockBlob *BlockReference = new KaxBlockBlob(BLOCK_BLOB_NO_SIMPLE);
BlockReference->SetBlockGroup(*const_cast<KaxBlockGroup*>(&BlockRef));
BlockReference->SetBlockGroup(const_cast<KaxBlockGroup&>(BlockRef));

for (ListIdx = myTempReferences.begin(); ListIdx != myTempReferences.end(); ListIdx++)
if (&(KaxBlockGroup&)*ListIdx == &BlockRef) {
Expand Down
20 changes: 10 additions & 10 deletions src/KaxCuesData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, std::uint64_
{
// fill me
auto & NewTime = GetChild<KaxCueTime>(*this);
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
static_cast<EbmlUInteger &>(NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;

auto & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
auto & TheTrack = GetChild<KaxCueTrack>(NewPositions);
*static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNumber();
static_cast<EbmlUInteger &>(TheTrack) = BlockReference.TrackNumber();

auto & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
static_cast<EbmlUInteger &>(TheClustPos) = BlockReference.ClusterPosition();

// handle reference use
if (BlockReference.ReferenceCount() != 0) {
Expand All @@ -46,7 +46,7 @@ void KaxCuePoint::PositionSet(const KaxBlockGroup & BlockReference, std::uint64_
auto CodecState = static_cast<KaxCodecState *>(BlockReference.FindFirstElt(EBML_INFO(KaxCodecState)));
if (CodecState) {
auto &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
static_cast<EbmlUInteger &>(CueCodecState) = BlockReference.GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
}

SetValueIsSet();
Expand All @@ -73,14 +73,14 @@ void KaxCuePoint::PositionSet(const KaxInternalBlock & BlockReference, const Kax
{
// fill me
auto & NewTime = GetChild<KaxCueTime>(*this);
*static_cast<EbmlUInteger*>(&NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;
static_cast<EbmlUInteger &>(NewTime) = BlockReference.GlobalTimecode() / GlobalTimecodeScale;

auto & NewPositions = AddNewChild<KaxCueTrackPositions>(*this);
auto & TheTrack = GetChild<KaxCueTrack>(NewPositions);
*static_cast<EbmlUInteger*>(&TheTrack) = BlockReference.TrackNum();
static_cast<EbmlUInteger &>(TheTrack) = BlockReference.TrackNum();

auto & TheClustPos = GetChild<KaxCueClusterPosition>(NewPositions);
*static_cast<EbmlUInteger*>(&TheClustPos) = BlockReference.ClusterPosition();
static_cast<EbmlUInteger &>(TheClustPos) = BlockReference.ClusterPosition();

#if 0 // MATROSKA_VERSION >= 2
// handle reference use
Expand All @@ -97,7 +97,7 @@ void KaxCuePoint::PositionSet(const KaxInternalBlock & BlockReference, const Kax
const auto CodecState = static_cast<const KaxCodecState *>(BlockGroup->FindFirstElt(EBML_INFO(KaxCodecState)));
if (CodecState) {
auto &CueCodecState = AddNewChild<KaxCueCodecState>(NewPositions);
*static_cast<EbmlUInteger*>(&CueCodecState) = BlockGroup->GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
static_cast<EbmlUInteger &>(CueCodecState) = BlockGroup->GetParentCluster()->GetParentSegment()->GetRelativePosition(CodecState->GetElementPosition());
}
}

Expand All @@ -111,10 +111,10 @@ void KaxCueReference::AddReference(const KaxBlockBlob & BlockReference, std::uin
{
auto& theBlock = static_cast<KaxInternalBlock&>(BlockReference);
auto& NewTime = GetChild<KaxCueRefTime>(*this);
*static_cast<EbmlUInteger*>(&NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;
static_cast<EbmlUInteger &>(NewTime) = theBlock.GlobalTimecode() / GlobalTimecodeScale;

auto & TheClustPos = GetChild<KaxCueRefCluster>(*this);
*static_cast<EbmlUInteger*>(&TheClustPos) = theBlock.ClusterPosition();
static_cast<EbmlUInteger &>(TheClustPos) = theBlock.ClusterPosition();
}

bool KaxCuePoint::IsSmallerThan(const EbmlElement * Cmp) const
Expand Down
2 changes: 1 addition & 1 deletion src/KaxSeekHead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ KaxSeek * KaxSeekHead::IndexThis(const EbmlElement & aElt, const KaxSegment & Pa

// add the informations to this element
auto & aNewPos = GetChild<KaxSeekPosition>(aNewPoint);
*static_cast<EbmlUInteger *>(&aNewPos) = ParentSegment.GetRelativePosition(aElt);
static_cast<EbmlUInteger &>(aNewPos) = ParentSegment.GetRelativePosition(aElt);

auto & aNewID = GetChild<KaxSeekID>(aNewPoint);
binary ID[4];
Expand Down
2 changes: 1 addition & 1 deletion src/KaxTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ KaxTrackEntry::KaxTrackEntry()
void KaxTrackEntry::EnableLacing(bool bEnable)
{
auto & myLacing = GetChild<KaxTrackFlagLacing>(*this);
*(static_cast<EbmlUInteger *>(&myLacing)) = bEnable ? 1 : 0;
static_cast<EbmlUInteger &>(myLacing) = bEnable ? 1 : 0;
}

} // namespace libmatroska
6 changes: 3 additions & 3 deletions test/ebml/test00.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ int main(void)

printf("Write EBML + Matroska elements\n");
EDocType & MyDocType = GetChild<EDocType>(TestHead);
*static_cast<EbmlString *>(&MyDocType) = "matroska";
static_cast<EbmlString &>(MyDocType) = "matroska";

EDocTypeVersion & MyDocTypeVer = GetChild<EDocTypeVersion>(TestHead);
*(static_cast<EbmlUInteger *>(&MyDocTypeVer)) = 1;
static_cast<EbmlUInteger &>(MyDocTypeVer) = 1;

EDocTypeReadVersion & MyDocTypeReadVer = GetChild<EDocTypeReadVersion>(TestHead);
*(static_cast<EbmlUInteger *>(&MyDocTypeReadVer)) = 1;
static_cast<EbmlUInteger &>(MyDocTypeReadVer) = 1;

TestHead.Render(Ebml_file);

Expand Down
70 changes: 35 additions & 35 deletions test/mux/test6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ int main(int argc, char **argv)
EbmlHead FileHead;

EDocType & MyDocType = GetChild<EDocType>(FileHead);
*static_cast<EbmlString *>(&MyDocType) = "matroska";
static_cast<EbmlString &>(MyDocType) = "matroska";

EDocTypeVersion & MyDocTypeVer = GetChild<EDocTypeVersion>(FileHead);
*(static_cast<EbmlUInteger *>(&MyDocTypeVer)) = 2;
static_cast<EbmlUInteger &>(MyDocTypeVer) = 2;

EDocTypeReadVersion & MyDocTypeReadVer = GetChild<EDocTypeReadVersion>(FileHead);
*(static_cast<EbmlUInteger *>(&MyDocTypeReadVer)) = 1;
static_cast<EbmlUInteger &>(MyDocTypeReadVer) = 1;

FileHead.Render(out_file, bWriteDefaultValues);

Expand All @@ -79,10 +79,10 @@ int main(int argc, char **argv)
// fill the mandatory Info section
KaxInfo & MyInfos = GetChild<KaxInfo>(FileSegment);
KaxTimecodeScale & TimeScale = GetChild<KaxTimecodeScale>(MyInfos);
*(static_cast<EbmlUInteger *>(&TimeScale)) = TIMECODE_SCALE;
static_cast<EbmlUInteger &>(TimeScale) = TIMECODE_SCALE;

KaxDuration & SegDuration = GetChild<KaxDuration>(MyInfos);
*(static_cast<EbmlFloat *>(&SegDuration)) = 0.0;
static_cast<EbmlFloat &>(SegDuration) = 0.0;

*((EbmlUnicodeString *)&GetChild<KaxMuxingApp>(MyInfos)) = UTFstring{L"libmatroska 0.5.0"};
*((EbmlUnicodeString *)&GetChild<KaxWritingApp>(MyInfos)) = UTFstring{L"����"};
Expand All @@ -96,42 +96,42 @@ int main(int argc, char **argv)
MyTrack1.SetGlobalTimecodeScale(TIMECODE_SCALE);

KaxTrackNumber & MyTrack1Number = GetChild<KaxTrackNumber>(MyTrack1);
*(static_cast<EbmlUInteger *>(&MyTrack1Number)) = 1;
static_cast<EbmlUInteger &>(MyTrack1Number) = 1;

KaxTrackUID & MyTrack1UID = GetChild<KaxTrackUID>(MyTrack1);
*(static_cast<EbmlUInteger *>(&MyTrack1UID)) = 7;
static_cast<EbmlUInteger &>(MyTrack1UID) = 7;

*(static_cast<EbmlUInteger *>(&GetChild<KaxTrackType>(MyTrack1))) = track_audio;
static_cast<EbmlUInteger &>(GetChild<KaxTrackType>(MyTrack1)) = track_audio;

KaxCodecID & MyTrack1CodecID = GetChild<KaxCodecID>(MyTrack1);
*static_cast<EbmlString *>(&MyTrack1CodecID) = "Dummy Audio Codec";
static_cast<EbmlString &>(MyTrack1CodecID) = "Dummy Audio Codec";

MyTrack1.EnableLacing(true);

// Test the new ContentEncoding elements
KaxContentEncodings &cencodings = GetChild<KaxContentEncodings>(MyTrack1);
KaxContentEncoding &cencoding = GetChild<KaxContentEncoding>(cencodings);
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentEncodingOrder>(cencoding))) = 10;
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentEncodingScope>(cencoding))) = 11;
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentEncodingType>(cencoding))) = 12;
static_cast<EbmlUInteger &>(GetChild<KaxContentEncodingOrder>(cencoding)) = 10;
static_cast<EbmlUInteger &>(GetChild<KaxContentEncodingScope>(cencoding)) = 11;
static_cast<EbmlUInteger &>(GetChild<KaxContentEncodingType>(cencoding)) = 12;

KaxContentCompression &ccompression = GetChild<KaxContentCompression>(cencoding);
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentCompAlgo>(ccompression))) = 13;
static_cast<EbmlUInteger &>(GetChild<KaxContentCompAlgo>(ccompression)) = 13;
GetChild<KaxContentCompSettings>(ccompression).CopyBuffer((const binary *)"hello1", 6);

KaxContentEncryption &cencryption = GetChild<KaxContentEncryption>(cencoding);
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentEncAlgo>(cencryption))) = 14;
static_cast<EbmlUInteger &>(GetChild<KaxContentEncAlgo>(cencryption)) = 14;
GetChild<KaxContentEncKeyID>(cencryption).CopyBuffer((const binary *)"hello2", 6);
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentSigAlgo>(cencryption))) = 15;
*(static_cast<EbmlUInteger *>(&GetChild<KaxContentSigHashAlgo>(cencryption))) = 16;
static_cast<EbmlUInteger &>(GetChild<KaxContentSigAlgo>(cencryption)) = 15;
static_cast<EbmlUInteger &>(GetChild<KaxContentSigHashAlgo>(cencryption)) = 16;
GetChild<KaxContentSigKeyID>(cencryption).CopyBuffer((const binary *)"hello3", 6);
GetChild<KaxContentSignature>(cencryption).CopyBuffer((const binary *)"hello4", 6);

// audio specific params
KaxTrackAudio & MyTrack1Audio = GetChild<KaxTrackAudio>(MyTrack1);

KaxAudioSamplingFreq & MyTrack1Freq = GetChild<KaxAudioSamplingFreq>(MyTrack1Audio);
*(static_cast<EbmlFloat *>(&MyTrack1Freq)) = 44100.0;
static_cast<EbmlFloat &>(MyTrack1Freq) = 44100.0;
MyTrack1Freq.ValidateSize();

KaxAudioPosition & MyTrack1Pos = GetChild<KaxAudioPosition>(MyTrack1Audio);
Expand All @@ -144,33 +144,33 @@ int main(int argc, char **argv)
MyTrack1Pos.SetBuffer(_Pos, 5);

KaxAudioChannels & MyTrack1Channels = GetChild<KaxAudioChannels>(MyTrack1Audio);
*(static_cast<EbmlUInteger *>(&MyTrack1Channels)) = 2;
static_cast<EbmlUInteger &>(MyTrack1Channels) = 2;

// fill track 2 params
KaxTrackEntry & MyTrack2 = GetNextChild<KaxTrackEntry>(MyTracks, MyTrack1);
MyTrack2.SetGlobalTimecodeScale(TIMECODE_SCALE);

KaxTrackNumber & MyTrack2Number = GetChild<KaxTrackNumber>(MyTrack2);
*(static_cast<EbmlUInteger *>(&MyTrack2Number)) = 200;
static_cast<EbmlUInteger &>(MyTrack2Number) = 200;

KaxTrackUID & MyTrack2UID = GetChild<KaxTrackUID>(MyTrack2);
*(static_cast<EbmlUInteger *>(&MyTrack2UID)) = 13;
static_cast<EbmlUInteger &>(MyTrack2UID) = 13;

*(static_cast<EbmlUInteger *>(&GetChild<KaxTrackType>(MyTrack2))) = track_video;
static_cast<EbmlUInteger &>(GetChild<KaxTrackType>(MyTrack2)) = track_video;

KaxCodecID & MyTrack2CodecID = GetChild<KaxCodecID>(MyTrack2);
*static_cast<EbmlString *>(&MyTrack2CodecID) = "Dummy Video Codec";
static_cast<EbmlString &>(MyTrack2CodecID) = "Dummy Video Codec";

MyTrack2.EnableLacing(false);

// video specific params
KaxTrackVideo & MyTrack2Video = GetChild<KaxTrackVideo>(MyTrack2);

KaxVideoPixelHeight & MyTrack2PHeight = GetChild<KaxVideoPixelHeight>(MyTrack2Video);
*(static_cast<EbmlUInteger *>(&MyTrack2PHeight)) = 200;
static_cast<EbmlUInteger &>(MyTrack2PHeight) = 200;

KaxVideoPixelWidth & MyTrack2PWidth = GetChild<KaxVideoPixelWidth>(MyTrack2Video);
*(static_cast<EbmlUInteger *>(&MyTrack2PWidth)) = 320;
static_cast<EbmlUInteger &>(MyTrack2PWidth) = 320;

std::uint64_t TrackSize = MyTracks.Render(out_file, bWriteDefaultValues);

Expand Down Expand Up @@ -279,27 +279,27 @@ int main(int argc, char **argv)
KaxEditionEntry & aEdition = GetChild<KaxEditionEntry>(Chapters);
KaxChapterAtom & aAtom = GetChild<KaxChapterAtom>(aEdition);
KaxChapterUID & aUID = GetChild<KaxChapterUID>(aAtom);
*static_cast<EbmlUInteger *>(&aUID) = 0x67890;
static_cast<EbmlUInteger &>(aUID) = 0x67890;

KaxChapterTimeStart & aChapStart = GetChild<KaxChapterTimeStart>(aAtom);
*static_cast<EbmlUInteger *>(&aChapStart) = 0;
static_cast<EbmlUInteger &>(aChapStart) = 0;

KaxChapterTimeEnd & aChapEnd = GetChild<KaxChapterTimeEnd>(aAtom);
*static_cast<EbmlUInteger *>(&aChapEnd) = 300 * TIMECODE_SCALE;
static_cast<EbmlUInteger &>(aChapEnd) = 300 * TIMECODE_SCALE;

KaxChapterDisplay & aDisplay = GetChild<KaxChapterDisplay>(aAtom);
KaxChapterString & aChapString = GetChild<KaxChapterString>(aDisplay);
*static_cast<EbmlUnicodeString *>(&aChapString) = UTFstring{L"Le film r�duit � un chapitre"};
static_cast<EbmlUnicodeString &>(aChapString) = UTFstring{L"Le film r�duit � un chapitre"};

KaxChapterLanguage & aChapLang = GetChild<KaxChapterLanguage>(aDisplay);
*static_cast<EbmlString *>(&aChapLang) = "fra";
static_cast<EbmlString &>(aChapLang) = "fra";

KaxChapterDisplay & aDisplay2 = GetNextChild<KaxChapterDisplay>(aAtom, aDisplay);
KaxChapterString & aChapString2 = GetChild<KaxChapterString>(aDisplay2);
*static_cast<EbmlUnicodeString *>(&aChapString2) = UTFstring{L"The movie in one chapter"};
static_cast<EbmlUnicodeString &>(aChapString2) = UTFstring{L"The movie in one chapter"};

KaxChapterLanguage & aChapLang2 = GetChild<KaxChapterLanguage>(aDisplay2);
*static_cast<EbmlString *>(&aChapLang2) = "eng";
static_cast<EbmlString &>(aChapLang2) = "eng";

filepos_t ChapterSize = Chapters.Render(out_file, bWriteDefaultValues);
MetaSeek.IndexThis(Chapters, FileSegment);
Expand All @@ -312,16 +312,16 @@ int main(int argc, char **argv)
KaxTagSimple & TagSimple = GetChild<KaxTagSimple>(aTag);

KaxTagTrackUID & TrackUID = GetChild<KaxTagTrackUID>(Targets);
*static_cast<EbmlUInteger *>(&TrackUID) = 0x12345;
static_cast<EbmlUInteger &>(TrackUID) = 0x12345;

KaxTagChapterUID & ChapterUID = GetChild<KaxTagChapterUID>(Targets);
*static_cast<EbmlUInteger *>(&ChapterUID) = 0x67890;
static_cast<EbmlUInteger &>(ChapterUID) = 0x67890;

KaxTagName & aTagName = GetChild<KaxTagName>(TagSimple);
*static_cast<EbmlUnicodeString *>(&aTagName) = UTFstring{L"NAME"};
static_cast<EbmlUnicodeString &>(aTagName) = UTFstring{L"NAME"};

KaxTagString & aTagtring = GetChild<KaxTagString>(TagSimple);
*static_cast<EbmlUnicodeString *>(&aTagtring) = UTFstring{L"Test�123"};
static_cast<EbmlUnicodeString &>(aTagtring) = UTFstring{L"Test�123"};

filepos_t TagsSize = AllTags.Render(out_file, bWriteDefaultValues);
MetaSeek.IndexThis(AllTags, FileSegment);
Expand Down
24 changes: 12 additions & 12 deletions test/tags/test9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ int main() {
StdIOCallback out("test.mkv", MODE_CREATE);

EDocType &doc_type = GetChild<EDocType>(head);
*static_cast<EbmlString *>(&doc_type) = "matroska";
static_cast<EbmlString &>(doc_type) = "matroska";
EDocTypeVersion &doc_type_ver = GetChild<EDocTypeVersion>(head);
*(static_cast<EbmlUInteger *>(&doc_type_ver)) = 1;
static_cast<EbmlUInteger &>(doc_type_ver) = 1;
EDocTypeReadVersion &doc_type_read_ver =
GetChild<EDocTypeReadVersion>(head);
*(static_cast<EbmlUInteger *>(&doc_type_read_ver)) = 1;
static_cast<EbmlUInteger &>(doc_type_read_ver) = 1;

head.Render(out);

KaxInfo &info = GetChild<KaxInfo>(segment);
KaxTimecodeScale &time_scale = GetChild<KaxTimecodeScale>(info);
*(static_cast<EbmlUInteger *>(&time_scale)) = 1000000;
static_cast<EbmlUInteger &>(time_scale) = 1000000;

segment.WriteHead(out, 5);

Expand All @@ -59,29 +59,29 @@ int main() {
KaxTag &tag = GetChild<KaxTag>(tags);

KaxTagTargets &targets = GetChild<KaxTagTargets>(tag);
*(static_cast<EbmlUInteger *>(&GetChild<KaxTagTrackUID>(targets))) =
static_cast<EbmlUInteger &>(GetChild<KaxTagTrackUID>(targets)) =
1234;

KaxTagSimple &stag_l1 = GetChild<KaxTagSimple>(tag);
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagName>(stag_l1))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagName>(stag_l1)) =
UTFstring{L"SIMPLE_TAG_NAME_LEVEL1_1"};
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagString>(stag_l1))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagString>(stag_l1)) =
UTFstring{L"SIMPLE_TAG_STRING_LEVEL1_1"};
KaxTagSimple &stag_l1_2 = GetNextChild<KaxTagSimple>(tag, stag_l1);
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagName>(stag_l1_2))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagName>(stag_l1_2)) =
UTFstring{L"SIMPLE_TAG_NAME_LEVEL1_2"};
KaxTagBinary &tbin = GetChild<KaxTagBinary>(stag_l1_2);
tbin.CopyBuffer((binary *)"SIMPLE_TAG_BINARY_LEVEL1_2",
strlen("SIMPLE_TAG_BINARY_LEVEL1_2"));
KaxTagSimple &stag_l2 = GetChild<KaxTagSimple>(stag_l1);
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagName>(stag_l2))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagName>(stag_l2)) =
UTFstring{L"SIMPLE_TAG_NAME_LEVEL2"};
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagString>(stag_l2))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagString>(stag_l2)) =
UTFstring{L"SIMPLE_TAG_STRING_LEVEL2"};
KaxTagSimple &stag_l3 = GetChild<KaxTagSimple>(stag_l2);
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagName>(stag_l3))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagName>(stag_l3)) =
UTFstring{L"SIMPLE_TAG_NAME_LEVEL3"};
*(static_cast<EbmlUnicodeString *>(&GetChild<KaxTagString>(stag_l3))) =
static_cast<EbmlUnicodeString &>(GetChild<KaxTagString>(stag_l3)) =
UTFstring{L"SIMPLE_TAG_STRING_LEVEL3"};

tags.Render(out);
Expand Down
Loading