From 0ec63bbbe191ef9819159dfb7bc5812d6338891a Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Fri, 29 Dec 2023 13:22:08 +0100 Subject: [PATCH] Don't use constexpr for possibly exported EbmlSemanticContext We may clean that later --- ebml/EbmlElement.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h index 61b57950..6f02bd0f 100644 --- a/ebml/EbmlElement.h +++ b/ebml/EbmlElement.h @@ -51,17 +51,17 @@ class EbmlSemanticContext; class EbmlElement; #define DEFINE_xxx_CONTEXT(x,global) \ - constexpr const EbmlSemanticContext Context_##x = EbmlSemanticContext(countof(ContextList_##x), ContextList_##x, nullptr, global, nullptr); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(countof(ContextList_##x), ContextList_##x, nullptr, global, nullptr); \ #define DEFINE_xxx_MASTER(x,id,idl,parent,infinite,name,global) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(countof(ContextList_##x), ContextList_##x, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(countof(ContextList_##x), ContextList_##x, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, infinite, name, Context_##x); \ x::x() :EbmlMaster(x::ClassInfos, Context_##x) {} #define DEFINE_xxx_MASTER_CONS(x,id,idl,parent,infinite,name,global) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(countof(ContextList_##x), ContextList_##x, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(countof(ContextList_##x), ContextList_##x, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, infinite, name, Context_##x); // define a master class with no parent class @@ -72,36 +72,36 @@ class EbmlElement; #define DEFINE_xxx_CLASS(x,id,idl,parent,name,global) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); \ x::x() {} #define DEFINE_xxx_CLASS_CONS(x,id,idl,parent,name,global) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); #define DEFINE_xxx_UINTEGER_DEF(x,id,idl,parent,name,global,defval) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); \ x::x() :EbmlUInteger(x::ClassInfos, defval) {} #define DEFINE_xxx_SINTEGER_DEF(x,id,idl,parent,name,global,defval) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); \ x::x() :EbmlSInteger(x::ClassInfos, defval) {} #define DEFINE_xxx_STRING_DEF(x,id,idl,parent,name,global,defval) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); \ x::x() :EbmlString(x::ClassInfos, defval) {} #define DEFINE_xxx_FLOAT_DEF(x,id,idl,parent,name,global,defval) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, &Context_##parent, global, &EBML_INFO(x)); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); \ x::x() :EbmlFloat(x::ClassInfos, defval) {} @@ -112,7 +112,7 @@ class EbmlElement; #define DEFINE_xxx_CLASS_ORPHAN(x,id,idl,name,global) \ constexpr EbmlId Id_##x (id, idl); \ - constexpr EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, nullptr, global, nullptr); \ + const EbmlSemanticContext Context_##x = EbmlSemanticContext(0, nullptr, nullptr, global, nullptr); \ constexpr EbmlCallbacks x::ClassInfos(x::Create, Id_##x, false, name, Context_##x); \ #define DEFINE_EBML_CONTEXT(x) DEFINE_xxx_CONTEXT(x,GetEbmlGlobal_Context)