summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.h
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-02-01 17:51:30 -0800
committerMonroe Linden <monroe@lindenlab.com>2010-02-01 17:51:30 -0800
commit4ad357ec70e15afdfe78816990cb23c7ba17619c (patch)
tree30b9b053dc309b69835c6f496f54df1fff59ab83 /indra/llui/lltextbase.h
parentaeaaf90fd7e36432428df9a6bcda6eb51a5cf0b1 (diff)
Fixes for EXT-4689 (Long-word chat spam cripples fps and/or disconnects client)
Removed some unnecessary string copies in LLTextBase and LLNormalTextSegment by changing getWText() to return const LLWString& (instead of LLWString), and storing the result in a const LLWString& instead of an LLWString in places where the string doesn't need to be modified. Made LLTextViewModel::getDisplay() also return const LLWString& instead of LLWString. Removed a couple of unused local string variables in LLTextBase (the compiler flagged these after converting the local copies to const LLWString&).
Diffstat (limited to 'indra/llui/lltextbase.h')
-rw-r--r--indra/llui/lltextbase.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 48d5478088..b5c7fab67a 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -145,7 +145,7 @@ public:
// wide-char versions
void setWText(const LLWString& text);
- LLWString getWText() const;
+ const LLWString& getWText() const;
void appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params = LLStyle::Params());
// force reflow of text