summaryrefslogtreecommitdiff
path: root/indra/llui/lluistring.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lluistring.h')
-rw-r--r--indra/llui/lluistring.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h
index 32cfc0d9cd..3f91856e26 100644
--- a/indra/llui/lluistring.h
+++ b/indra/llui/lluistring.h
@@ -64,9 +64,9 @@ class LLUIString
public:
// These methods all perform appropriate argument substitution
// and modify mOrig where appropriate
- LLUIString() : mNeedsResult(false), mNeedsWResult(false) {}
+ LLUIString() : mArgs(NULL), mNeedsResult(false), mNeedsWResult(false) {}
LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args);
- LLUIString(const std::string& instring) { assign(instring); }
+ LLUIString(const std::string& instring) : mArgs(NULL) { assign(instring); }
void assign(const std::string& instring);
LLUIString& operator=(const std::string& s) { assign(s); return *this; }
@@ -86,7 +86,7 @@ public:
S32 length() const { return getUpdatedWResult().size(); }
void clear();
- void clearArgs() { mArgs.clear(); }
+ void clearArgs() { if (mArgs) mArgs->clear(); }
// These utility functions are included for text editing.
// They do not affect mOrig and do not perform argument substitution
@@ -105,11 +105,12 @@ private:
// do actual work of updating strings (non-inlined)
void updateResult() const;
void updateWResult() const;
+ LLStringUtil::format_map_t& getArgs();
std::string mOrig;
mutable std::string mResult;
mutable LLWString mWResult; // for displaying
- LLStringUtil::format_map_t mArgs;
+ LLStringUtil::format_map_t* mArgs;
// controls lazy evaluation
mutable bool mNeedsResult;