From 928b7cba3ec0eb675a254ff840f398b70e5a8a8c Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 25 Nov 2009 22:00:15 -0800 Subject: Linker optimization, use extern template for LLView::getChild<> --- indra/llui/lllineeditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 4ea30dbd4d..cade6e45e1 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -71,6 +71,10 @@ const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click static LLDefaultChildRegistry::Register r1("line_editor"); +// Compiler optimization, generate extern template +template class LLLineEditor* LLView::getChild( + const std::string& name, BOOL recurse) const; + // // Member functions // -- cgit v1.2.3 From b50ba67bd8ab329d598ce47e5d3ac09b59fffb63 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sun, 29 Nov 2009 10:19:17 -0800 Subject: Revert extern template link optimization until I can build/test on PC --- indra/llui/lllineeditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index cade6e45e1..1551aab192 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -72,8 +72,8 @@ const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click static LLDefaultChildRegistry::Register r1("line_editor"); // Compiler optimization, generate extern template -template class LLLineEditor* LLView::getChild( - const std::string& name, BOOL recurse) const; +//template class LLLineEditor* LLView::getChild( +// const std::string& name, BOOL recurse) const; // // Member functions -- cgit v1.2.3 From 7d3b3cc474822db144b623980d08b7addc2f77ff Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 30 Nov 2009 14:41:52 -0800 Subject: Linker optimization - use "extern template" for commonly regenerated templates Also replaced many duplicate calls to LLViewerCamera::getInstance() with local pointer. Reviewed with Ambroff --- indra/llui/lllineeditor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui/lllineeditor.cpp') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 1551aab192..8a21155cc3 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -34,6 +34,7 @@ #include "linden_common.h" +#define LLLINEEDITOR_CPP #include "lllineeditor.h" #include "lltexteditor.h" @@ -72,8 +73,8 @@ const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click static LLDefaultChildRegistry::Register r1("line_editor"); // Compiler optimization, generate extern template -//template class LLLineEditor* LLView::getChild( -// const std::string& name, BOOL recurse) const; +template class LLLineEditor* LLView::getChild( + const std::string& name, BOOL recurse) const; // // Member functions -- cgit v1.2.3