Skip to content

Commit

Permalink
merge DEFINE_xxx_CLASS_GLOBAL into DEFINE_xxx_CLASS_ORPHAN
Browse files Browse the repository at this point in the history
They have exactly the same defintion and shouldn't differ in the future.
  • Loading branch information
robUx4 committed Dec 29, 2023
1 parent d1e0a9e commit d0af2a8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions ebml/EbmlElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ class EbmlElement;
constexpr const EbmlCallbacksDefault<double> x::ClassInfos(x::Create, Id_##x, static_cast<double>(defval), name, Context_##x); \
x::x() :EbmlFloat(x::ClassInfos) {}

#define DEFINE_xxx_CLASS_GLOBAL(x,id,idl,name,global) \
constexpr const EbmlId Id_##x (id, idl); \
constexpr const EbmlSemanticContext EmptyContext_##x = EbmlSemanticContext(0, nullptr, nullptr, global, nullptr); \
constexpr const EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, EmptyContext_##x); \

#define DEFINE_xxx_CLASS_ORPHAN(x,id,idl,name,global) \
constexpr const EbmlId Id_##x (id, idl); \
constexpr const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, nullptr, global, nullptr); \
Expand All @@ -152,7 +147,6 @@ class EbmlElement;
#define DEFINE_EBML_CONTEXT(x) DEFINE_xxx_CONTEXT(x,GetEbmlGlobal_Context)
#define DEFINE_EBML_MASTER(x,id,idl,parent,infinite,name) DEFINE_xxx_MASTER(x,id,idl,parent,infinite,name,GetEbmlGlobal_Context)
#define DEFINE_EBML_MASTER_ORPHAN(x,id,idl,infinite,name) DEFINE_xxx_MASTER_ORPHAN(x,id,idl,infinite,name,GetEbmlGlobal_Context)
#define DEFINE_EBML_CLASS_GLOBAL(x,id,idl,name) DEFINE_xxx_CLASS_GLOBAL(x,id,idl,name,GetEbmlGlobal_Context)
#define DEFINE_EBML_CLASS_ORPHAN(x,id,idl,name) DEFINE_xxx_CLASS_ORPHAN(x,id,idl,name,GetEbmlGlobal_Context)
#define DEFINE_EBML_UINTEGER_DEF(x,id,idl,parent,name,val) DEFINE_xxx_UINTEGER_DEF(x,id,idl,parent,name,GetEbmlGlobal_Context,val)
#define DEFINE_EBML_STRING(x,id,idl,parent,name) DEFINE_xxx_STRING(x,id,idl,parent,name,GetEbmlGlobal_Context)
Expand Down
2 changes: 1 addition & 1 deletion src/EbmlCrc32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static constexpr std::uint32_t CRC32_NEGL = 0xffffffffL;

namespace libebml {

DEFINE_EBML_CLASS_GLOBAL(EbmlCrc32, 0xBF, 1, "EBMLCrc32\0ratamadabapa")
DEFINE_EBML_CLASS_ORPHAN(EbmlCrc32, 0xBF, 1, "EBMLCrc32\0ratamadabapa")

static constexpr std::array<std::uint32_t, 256> s_tab {
#ifdef WORDS_BIGENDIAN
Expand Down
2 changes: 1 addition & 1 deletion src/EbmlVoid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace libebml {

DEFINE_EBML_CLASS_GLOBAL(EbmlVoid, 0xEC, 1, "EBMLVoid")
DEFINE_EBML_CLASS_ORPHAN(EbmlVoid, 0xEC, 1, "EBMLVoid")

EbmlVoid::EbmlVoid()
:EbmlBinary(EbmlVoid::ClassInfos)
Expand Down

0 comments on commit d0af2a8

Please sign in to comment.