summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-11-28 16:51:02 -0800
committerJames Cook <james@lindenlab.com>2009-11-28 16:51:02 -0800
commitf280c43d616d013747a9aab05141635868e00136 (patch)
tree22a502368ea5c0526fab30caf7679cff42272cdb /indra/llui
parentfd71800bb1c68c5d06199cf06de469ab7acdd2dc (diff)
Use extern template for common singletons to reduce code bloat/link time.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lluictrlfactory.cpp3
-rw-r--r--indra/llui/lluictrlfactory.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 1c1450d7e9..49182be328 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -75,6 +75,9 @@ public:
static LLDefaultChildRegistry::Register<LLUICtrlLocate> r1("locate");
+// Build time optimization, generate this once in .cpp file
+template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
+
//-----------------------------------------------------------------------------
// LLUICtrlFactory()
//-----------------------------------------------------------------------------
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 8a9c9e23c1..adb3f7202f 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -108,6 +108,9 @@ extern LLFastTimer::DeclareTimer FTM_WIDGET_SETUP;
extern LLFastTimer::DeclareTimer FTM_WIDGET_CONSTRUCTION;
extern LLFastTimer::DeclareTimer FTM_INIT_FROM_PARAMS;
+// Build time optimization, generate this once in .cpp file
+extern template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
+
class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
{
private: