summaryrefslogtreecommitdiff
path: root/indra/llui/llviewmodel.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-27 02:53:34 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-27 02:53:34 +0300
commitb2ef95522f07301cfddbdace1042e60d52fde436 (patch)
treec51119f79b734a7d503bb3adeac1759b819c8f92 /indra/llui/llviewmodel.cpp
parent43a338c6270f9a000052465d09d4ad999524af0b (diff)
parent3da7a50b71d4ef5919c2d4d5b9547b3ef0abab7d (diff)
Merge branch 'DRTVWR-543-maint' into DRTVWR-543-maint_cmake
Diffstat (limited to 'indra/llui/llviewmodel.cpp')
-rw-r--r--indra/llui/llviewmodel.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/indra/llui/llviewmodel.cpp b/indra/llui/llviewmodel.cpp
index 282addf692..a400eb70c0 100644
--- a/indra/llui/llviewmodel.cpp
+++ b/indra/llui/llviewmodel.cpp
@@ -37,15 +37,13 @@
///
LLViewModel::LLViewModel()
-: LLTrace::MemTrackable<LLViewModel>("LLViewModel"),
- mDirty(false)
+: mDirty(false)
{
}
/// Instantiate an LLViewModel with an existing data value
LLViewModel::LLViewModel(const LLSD& value)
-: LLTrace::MemTrackable<LLViewModel>("LLViewModel"),
- mDirty(false)
+: mDirty(false)
{
setValue(value);
}
@@ -82,15 +80,9 @@ LLTextViewModel::LLTextViewModel(const LLSD& value)
void LLTextViewModel::setValue(const LLSD& value)
{
// approximate LLSD storage usage
- disclaimMem(mDisplay.size());
LLViewModel::setValue(value);
- disclaimMem(mDisplay);
mDisplay = utf8str_to_wstring(value.asString());
- claimMem(mDisplay);
- // approximate LLSD storage usage
- claimMem(mDisplay.size());
-
// mDisplay and mValue agree
mUpdateFromDisplay = false;
}
@@ -101,12 +93,8 @@ void LLTextViewModel::setDisplay(const LLWString& value)
// and do the utf8str_to_wstring() to get the corresponding mDisplay
// value. But a text editor might want to edit the display string
// directly, then convert back to UTF8 on commit.
- disclaimMem(mDisplay.size());
- disclaimMem(mDisplay);
- mDisplay = value;
- claimMem(mDisplay);
- claimMem(mDisplay.size());
- mDirty = true;
+ mDisplay = value;
+ mDirty = true;
// Don't immediately convert to UTF8 -- do it lazily -- we expect many
// more setDisplay() calls than getValue() calls. Just flag that it needs
// doing.