From 12f0f8cb72f789e21b01b45063dcc5f1f5292087 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 1 Oct 2013 13:46:43 -0700 Subject: changed over to manual naming of MemTrackable stats changed claimMem and disclaimMem behavior to not pass through argument added more mem tracking stats to floater_stats --- indra/llui/lltextbase.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5c221edea7..730c3b2ada 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -576,7 +576,7 @@ void LLTextBase::drawText() if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) ) { const LLWString& wstrText = getWText(); - disclaimMem(mMisspellRanges).clear(); + mMisspellRanges.clear(); segment_set_t::const_iterator seg_it = getSegIterContaining(start); while (mSegments.end() != seg_it) @@ -652,7 +652,6 @@ void LLTextBase::drawText() mSpellCheckStart = start; mSpellCheckEnd = end; - claimMem(mMisspellRanges); } } else @@ -922,11 +921,9 @@ void LLTextBase::createDefaultSegment() if (mSegments.empty()) { LLStyleConstSP sp(new LLStyle(getStyleParams())); - disclaimMem(mSegments); LLTextSegmentPtr default_segment = new LLNormalTextSegment( sp, 0, getLength() + 1, *this); mSegments.insert(default_segment); default_segment->linkToDocument(this); - claimMem(mSegments); } } @@ -937,8 +934,6 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert) return; } - disclaimMem(mSegments); - segment_set_t::iterator cur_seg_iter = getSegIterContaining(segment_to_insert->getStart()); S32 reflow_start_index = 0; @@ -1011,7 +1006,6 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert) // layout potentially changed needsReflow(reflow_start_index); - claimMem(mSegments); } BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask) @@ -1322,10 +1316,8 @@ void LLTextBase::replaceWithSuggestion(U32 index) removeStringNoUndo(it->first, it->second - it->first); // Insert the suggestion in its place - disclaimMem(mSuggestionList); LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]); insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index])); - claimMem(mSuggestionList); setCursorPos(it->first + (S32)suggestion.length()); @@ -1388,7 +1380,7 @@ bool LLTextBase::isMisspelledWord(U32 pos) const void LLTextBase::onSpellCheckSettingsChange() { // Recheck the spelling on every change - disclaimMem(mMisspellRanges).clear(); + mMisspellRanges.clear(); mSpellCheckStart = mSpellCheckEnd = -1; } @@ -1666,7 +1658,7 @@ LLRect LLTextBase::getTextBoundingRect() void LLTextBase::clearSegments() { - disclaimMem(mSegments).clear(); + mSegments.clear(); createDefaultSegment(); } @@ -3210,9 +3202,7 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip) LL_WARNS() << "LLTextSegment::setToolTip: cannot replace keyword tooltip." << LL_ENDL; return; } - disclaimMem(mTooltip); mTooltip = tooltip; - claimMem(mTooltip); } bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const -- cgit v1.2.3