Skip to content

Commit

Permalink
add a macro to replace CreateElement
Browse files Browse the repository at this point in the history
  • Loading branch information
robUx4 committed Mar 2, 2024
1 parent 364283f commit df56d77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class DllApi x : public BaseClass { \
#define EBML_CONTEXT(e) tEBML_CONTEXT(e)
#define EBML_NAME(e) tEBML_NAME(e)
#define EBML_SPEC(e) tEBML_SPEC(e)
#define EBML_CREATE(e) EBML_INFO_CREATE(EBML_SPEC(e))

#define EBML_INFO_ID(cb) tEBML_INFO_ID(cb)
#define EBML_INFO_NAME(cb) tEBML_INFO_NAME(cb)
Expand Down
2 changes: 1 addition & 1 deletion src/EbmlMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ EbmlElement *EbmlMaster::FindNextElt(const EbmlElement & PastElt, bool bCreateIf

if (bCreateIfNull) {
// add the element
EbmlElement *NewElt = &(PastElt.CreateElement());
EbmlElement *NewElt = &(EBML_CREATE(PastElt));

if (!PushElement(*NewElt)) {
delete NewElt;
Expand Down

0 comments on commit df56d77

Please sign in to comment.