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/lltexteditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llui/lltexteditor.cpp') 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 r("simple_text_editor"); +// Compiler optimization, generate extern template +template class LLTextEditor* LLView::getChild( + const std::string& name, BOOL recurse) const; + // // Constants // -- cgit v1.2.3 From 5531149ad1190ffe2adb14b7df7dbf6a1f2f5365 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sat, 28 Nov 2009 21:25:53 -0800 Subject: Fix merge error --- indra/llui/lltexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lltexteditor.cpp') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 2df7d12704..628d566179 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2162,7 +2162,7 @@ void LLTextEditor::drawLineNumbers() return; } - S32 cursor_line = getLineNumFromDocIndex(mCursorPos); + S32 cursor_line = mLineInfoList[getLineNumFromDocIndex(mCursorPos)].mLineNum; if (mShowLineNumbers) { -- 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/lltexteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/lltexteditor.cpp') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 628d566179..6e07a890ad 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -74,8 +74,8 @@ static LLDefaultChildRegistry::Register r("simple_text_editor"); // Compiler optimization, generate extern template -template class LLTextEditor* LLView::getChild( - const std::string& name, BOOL recurse) const; +//template class LLTextEditor* LLView::getChild( +// const std::string& name, BOOL recurse) const; // // Constants -- 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/lltexteditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llui/lltexteditor.cpp') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 6e07a890ad..e68affc36c 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1,6 +1,5 @@ /** * @file lltexteditor.cpp - * @brief LLTextEditor base class * * $LicenseInfo:firstyear=2001&license=viewergpl$ * @@ -34,6 +33,7 @@ #include "linden_common.h" +#define LLTEXTEDITOR_CPP #include "lltexteditor.h" #include "llfontfreetype.h" // for LLFontFreetype::FIRST_CHAR @@ -74,8 +74,8 @@ static LLDefaultChildRegistry::Register r("simple_text_editor"); // Compiler optimization, generate extern template -//template class LLTextEditor* LLView::getChild( -// const std::string& name, BOOL recurse) const; +template class LLTextEditor* LLView::getChild( + const std::string& name, BOOL recurse) const; // // Constants -- cgit v1.2.3