Closed lattice0 closed 4 years ago
RenderData
has a third parameter that controls whether elements that are set to their default value are written to the file or not. That parameter's default value is false
, meaning "do not write elements set to their respective default values to the file". As you don't pass that third parameter to RenderData
, the file not containing the orwell
string is expected.
I created my own EbmlHead class subclassing from EbmlMaster and did this:
Then if I try to do
I get the expected binary file. But if
something
in
*static_cast<EbmlString *>(&GetChild<EDocType>(FileHead)) = "something";
is renamed to
orwell
which is the default value defined for
EDocType
as you can see, then I get a file with 0 bytes. Shouldn't it be a bug?I also tried to simply do
assuming it would write to the file since I already gave default values for every class, but it won't work, I get a file with 0 bytes