diff options
| -rw-r--r-- | indra/llui/llbutton.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llcheckboxctrl.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llpanel.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/lltextbox.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/lluictrl.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llview.cpp | 3 | ||||
| -rw-r--r-- | indra/llui/llview.h | 19 | 
9 files changed, 50 insertions, 0 deletions
| diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index b91c614424..ae25aec206 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -56,6 +56,10 @@  static LLDefaultChildRegistry::Register<LLButton> r("button"); +// Compiler optimization, generate extern template +template class LLButton* LLView::getChild<class LLButton>( +	const std::string& name, BOOL recurse) const; +  // globals loaded from settings.xml  S32	LLBUTTON_H_PAD	= 0;  S32	LLBUTTON_V_PAD	= 0; diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 7f0f9751db..33630dbb5e 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -50,6 +50,10 @@ const U32 MAX_STRING_LENGTH = 10;  static LLDefaultChildRegistry::Register<LLCheckBoxCtrl> r("check_box"); +// Compiler optimization, generate extern template +template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>( +	const std::string& name, BOOL recurse) const; +  LLCheckBoxCtrl::Params::Params()  :	text_enabled_color("text_enabled_color"),  	text_disabled_color("text_disabled_color"), 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<LLLineEditor> r1("line_editor"); +// Compiler optimization, generate extern template +template class LLLineEditor* LLView::getChild<class LLLineEditor>( +	const std::string& name, BOOL recurse) const; +  //  // Member functions  // diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 063822dd56..3a6c55ba0e 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -58,6 +58,10 @@  static LLDefaultChildRegistry::Register<LLPanel> r1("panel", &LLPanel::fromXML); +// Compiler optimization, generate extern template +template class LLPanel* LLView::getChild<class LLPanel>( +	const std::string& name, BOOL recurse) const; +  LLPanel::LocalizedString::LocalizedString()  :	name("name"),  	value("value") diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index 4c4123cf45..c0edccd0f3 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -40,6 +40,10 @@  static LLDefaultChildRegistry::Register<LLTextBox> r("text"); +// Compiler optimization, generate extern template +template class LLTextBox* LLView::getChild<class LLTextBox>( +	const std::string& name, BOOL recurse) const; +  LLTextBox::LLTextBox(const LLTextBox::Params& p)  :	LLTextBase(p),  	mClickedCallback(NULL) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3f4ef24f82..2df7d12704 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -73,6 +73,10 @@  //  static LLDefaultChildRegistry::Register<LLTextEditor> r("simple_text_editor"); +// Compiler optimization, generate extern template +template class LLTextEditor* LLView::getChild<class LLTextEditor>( +	const std::string& name, BOOL recurse) const; +  //  // Constants  // diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp index a30d5b4651..466f45942d 100644 --- a/indra/llui/lluictrl.cpp +++ b/indra/llui/lluictrl.cpp @@ -40,6 +40,10 @@  static LLDefaultChildRegistry::Register<LLUICtrl> r("ui_ctrl"); +// Compiler optimization, generate extern template +template class LLUICtrl* LLView::getChild<class LLUICtrl>( +	const std::string& name, BOOL recurse) const; +  LLUICtrl::Params::Params()  :	tab_stop("tab_stop", true),  	chrome("chrome", false), diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index dba24ee165..4fc52997a1 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -76,6 +76,9 @@ std::vector<LLViewDrawContext*> LLViewDrawContext::sDrawContextStack;  BOOL LLView::sIsDrawing = FALSE;  #endif +// Compiler optimization, generate extern template +template class LLView* LLView::getChild<class LLView>(const std::string& name, BOOL recurse) const; +  static LLDefaultChildRegistry::Register<LLView> r("view");  LLView::Params::Params() diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 2607120e17..5bf015362d 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -659,4 +659,23 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co  	return result;  } +// Compiler optimization - don't generate these specializations inline, +// require explicit specialization.  See llbutton.cpp for an example. +extern template class LLButton* LLView::getChild<class LLButton>( +	const std::string& name, BOOL recurse) const; +extern template class LLCheckBoxCtrl* LLView::getChild<class LLCheckBoxCtrl>( +	const std::string& name, BOOL recurse) const; +extern template class LLLineEditor* LLView::getChild<class LLLineEditor>( +	const std::string& name, BOOL recurse) const; +extern template class LLPanel* LLView::getChild<class LLPanel>( +	const std::string& name, BOOL recurse) const; +extern template class LLTextBox* LLView::getChild<class LLTextBox>( +	const std::string& name, BOOL recurse) const; +extern template class LLTextEditor* LLView::getChild<class LLTextEditor>( +	const std::string& name, BOOL recurse) const; +extern template class LLUICtrl* LLView::getChild<class LLUICtrl>( +	const std::string& name, BOOL recurse) const; +extern template class LLView* LLView::getChild<class LLView>( +	const std::string& name, BOOL recurse) const; +  #endif //LL_LLVIEW_H | 
