diff options
author | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-11-10 21:58:17 +0000 |
---|---|---|
committer | Ima Mechanique <ima.mechanique@secondlife.com> | 2013-11-10 21:58:17 +0000 |
commit | dc317ed70ac8b8344a745b4f43116460efdfdbca (patch) | |
tree | 0c4e98d701999e2b11f784670717813b65243bba /indra/llui/lltexteditor.cpp | |
parent | 488964157cb02b44ac9c72bb6c57e47c2b21ee53 (diff) |
Refactoring load routines to remove uneeded methods
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rwxr-xr-x | indra/llui/lltexteditor.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 4bab68b339..b6c2e20a9d 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2502,23 +2502,19 @@ BOOL LLTextEditor::tryToRevertToPristineState() static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); -void LLTextEditor::loadKeywords(const std::string& filename, - const std::vector<std::string>& funcs, - const std::vector<std::string>& tooltips, - const LLColor4& color) +void LLTextEditor::loadKeywords() { LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); - if(mKeywords.loadFromFile()) - { - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + mKeywords.processTokens(); - mSegments.clear(); - segment_set_t::iterator insert_it = mSegments.begin(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insert_it = mSegments.insert(insert_it, *list_it); - } + segment_vec_t segment_list; + mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + + mSegments.clear(); + segment_set_t::iterator insert_it = mSegments.begin(); + for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) + { + insert_it = mSegments.insert(insert_it, *list_it); } } |