From 364ca4e55fd99ad0da15cd6fa176c2009f52b729 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 30 Sep 2010 16:13:56 -0700 Subject: added macro for easier static registration --- indra/llxuixml/llregistry.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llxuixml/llregistry.h') diff --git a/indra/llxuixml/llregistry.h b/indra/llxuixml/llregistry.h index eee9933739..80e654854a 100644 --- a/indra/llxuixml/llregistry.h +++ b/indra/llxuixml/llregistry.h @@ -343,4 +343,9 @@ private: ScopedRegistrar* mStaticScope; }; +// helper macro for doing static registration +#define GLUED_TOKEN(x, y) x ## y +#define GLUE_TOKENS(x, y) GLUED_TOKEN(x, y) +#define LLREGISTER_STATIC(REGISTRY, KEY, VALUE) static REGISTRY::StaticRegistrar GLUE_TOKENS(reg, __COUNTER__)(KEY, VALUE); + #endif -- cgit v1.2.3