summaryrefslogtreecommitdiff
path: root/indra/llui/lluistring.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2010-11-08 16:47:46 -0500
committerOz Linden <oz@lindenlab.com>2010-11-08 16:47:46 -0500
commitb657516f72f016a918e0ff627105dd380a94394c (patch)
tree7d30ace2d3cba42c5f7de1c3dd23748e31b2803f /indra/llui/lluistring.h
parent451d115c1009ded2b2d74efefbe0611c62343eed (diff)
parentc446062bd3bd3f172b20f22f2086cea962fb7278 (diff)
pull beta changes back to development
Diffstat (limited to 'indra/llui/lluistring.h')
-rw-r--r--indra/llui/lluistring.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h
index eff2467bf0..4faa0e070e 100644
--- a/indra/llui/lluistring.h
+++ b/indra/llui/lluistring.h
@@ -58,10 +58,12 @@ class LLUIString
public:
// These methods all perform appropriate argument substitution
// and modify mOrig where appropriate
- LLUIString() : mArgs(NULL), 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) : mArgs(NULL) { assign(instring); }
+ ~LLUIString() { delete mArgs; }
+
void assign(const std::string& instring);
LLUIString& operator=(const std::string& s) { assign(s); return *this; }
@@ -81,14 +83,14 @@ public:
void 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
void truncate(S32 maxchars);
void erase(S32 charidx, S32 len);
void insert(S32 charidx, const LLWString& wchars);
void replace(S32 charidx, llwchar wc);
-
+
private:
// something changed, requiring reformatting of strings
void dirty();
@@ -100,7 +102,7 @@ private:
void updateResult() const;
void updateWResult() const;
LLStringUtil::format_map_t& getArgs();
-
+
std::string mOrig;
mutable std::string mResult;
mutable LLWString mWResult; // for displaying