-
Notifications
You must be signed in to change notification settings - Fork 47
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
[RFC] Store the default value in a union inside EbmlSemantic #156
Conversation
271c128
to
1fbb1ed
Compare
1fbb1ed
to
f2fc819
Compare
ebml/EbmlElement.h
Outdated
|
||
inline const DefaultValues & DefaultValue() const { return defaultValue; } | ||
|
||
#if defined(EBML_STRICT_API) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EBML_STRICT_API
has been removed with one of the commits over the last couple of days. Just always use private:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As stated in that comment…
79ea49c
to
c5473a1
Compare
c5473a1
to
7dafc65
Compare
This MR is just wrong, it should be stored alongside the EBML ID, not the semantic in the parent. And it turns out we already have macros to set the default value. |
A template might be cleaner, more type-safe. I gave it a try but it seemed very instrusive (all classes need to be touched).
This provides a basic system to set the default value in the semantic. If approve we can change how we set default values in libmatroska, using the new macros. And then we can switch the access to the default value to this storage in EbmlSemantic.