summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorIma Mechanique <ima.mechanique@secondlife.com>2013-11-10 21:58:17 +0000
committerIma Mechanique <ima.mechanique@secondlife.com>2013-11-10 21:58:17 +0000
commitdc317ed70ac8b8344a745b4f43116460efdfdbca (patch)
tree0c4e98d701999e2b11f784670717813b65243bba /indra
parent488964157cb02b44ac9c72bb6c57e47c2b21ee53 (diff)
Refactoring load routines to remove uneeded methods
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llui/llkeywords.cpp36
-rwxr-xr-xindra/llui/lltexteditor.cpp24
-rwxr-xr-xindra/llui/lltexteditor.h5
3 files changed, 11 insertions, 54 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index ac95a20588..65ede3e46f 100755
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -205,42 +205,6 @@ bool LLKeywords::initialise(LLSD SyntaxXML)
return mReady;
}
-BOOL LLKeywords::loadFromFile()
-{
- processTokens();
- return true;
-}
-
-/**
- * @brief Load xml serialised LLSD
- * @desc Opens the specified filespec and attempts to deserialise the
- * contained data to the specified LLSD object.
- * @return Returns boolean true/false indicating success or failure.
- */
-BOOL LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data)
-{
- mLoaded = false;
- llifstream file;
- file.open(filename);
- if(file.is_open())
- {
- mLoaded = (BOOL)LLSDSerialize::fromXML(data, file);
- if (!mLoaded)
- {
- LL_WARNS("") << "Unable to deserialise file: " << filename << LL_ENDL;
- }
- else
- {
- LL_INFOS("") << "Deserialised file: " << filename << LL_ENDL;
- }
- }
- else
- {
- LL_WARNS("") << "Unable to open file: " << filename << LL_ENDL;
- }
- return mLoaded;
-}
-
///**
// * @brief Start processing the colour LLSD from its beginning.
// *
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);
}
}
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 8cc0e03712..0b4a22b08b 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -187,10 +187,7 @@ public:
void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap );
LLKeywords mKeywords;
- void loadKeywords(const std::string& filename,
- const std::vector<std::string>& funcs,
- const std::vector<std::string>& tooltips,
- const LLColor4& func_color);
+ void loadKeywords();
LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); }
LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); }