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 From e7834520c725de122f2e62387e2563723735ab4e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 30 Sep 2010 16:43:16 -0700 Subject: fixed line ending --- indra/llxuixml/llregistry.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llxuixml/llregistry.h') diff --git a/indra/llxuixml/llregistry.h b/indra/llxuixml/llregistry.h index 80e654854a..546cf38eb5 100644 --- a/indra/llxuixml/llregistry.h +++ b/indra/llxuixml/llregistry.h @@ -343,8 +343,8 @@ private: ScopedRegistrar* mStaticScope; }; -// helper macro for doing static registration -#define GLUED_TOKEN(x, y) x ## y +// 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); -- cgit v1.2.3 From 94fbf6805435f98c09a132c807fe3a13aa882b54 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 1 Oct 2010 16:15:35 -0700 Subject: Fix for build issue on the mac. --- indra/llxuixml/llregistry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llxuixml/llregistry.h') diff --git a/indra/llxuixml/llregistry.h b/indra/llxuixml/llregistry.h index 546cf38eb5..36ce6a97b7 100644 --- a/indra/llxuixml/llregistry.h +++ b/indra/llxuixml/llregistry.h @@ -346,6 +346,6 @@ private: // 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); +#define LLREGISTER_STATIC(REGISTRY, KEY, VALUE) static REGISTRY::StaticRegistrar GLUE_TOKENS(reg, __LINE__)(KEY, VALUE); #endif -- cgit v1.2.3