diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2014-07-08 17:29:48 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2014-07-08 17:29:48 -0400 |
commit | 29bea5a6b94458e23559bdbeaae5a593100533b6 (patch) | |
tree | 5bd356450afd8da159542bfd444b653442004a45 /indra/llui/lltextbase.cpp | |
parent | 053f436413c01e237accabace4dc5ff1eccca837 (diff) | |
parent | 226929f8f5b8bc1080d0082b2595d689238df2b8 (diff) |
Merge. Refresh from viewer-release after 3.7.11 release.
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rwxr-xr-x | indra/llui/lltextbase.cpp | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 8906a6e736..71db0ac030 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -70,43 +70,36 @@ bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, cons // helper functors -struct LLTextBase::compare_bottom +bool LLTextBase::compare_bottom::operator()(const S32& a, const LLTextBase::line_info& b) const { - bool operator()(const S32& a, const LLTextBase::line_info& b) const - { - return a > b.mRect.mBottom; // bottom of a is higher than bottom of b - } - - bool operator()(const LLTextBase::line_info& a, const S32& b) const - { - return a.mRect.mBottom > b; // bottom of a is higher than bottom of b - } + return a > b.mRect.mBottom; // bottom of a is higher than bottom of b +} - bool operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const - { - return a.mRect.mBottom > b.mRect.mBottom; // bottom of a is higher than bottom of b - } +bool LLTextBase::compare_bottom::operator()(const LLTextBase::line_info& a, const S32& b) const +{ + return a.mRect.mBottom > b; // bottom of a is higher than bottom of b +} -}; +bool LLTextBase::compare_bottom::operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const +{ + return a.mRect.mBottom > b.mRect.mBottom; // bottom of a is higher than bottom of b +} // helper functors -struct LLTextBase::compare_top +bool LLTextBase::compare_top::operator()(const S32& a, const LLTextBase::line_info& b) const { - bool operator()(const S32& a, const LLTextBase::line_info& b) const - { - return a > b.mRect.mTop; // top of a is higher than top of b - } + return a > b.mRect.mTop; // top of a is higher than top of b +} - bool operator()(const LLTextBase::line_info& a, const S32& b) const - { - return a.mRect.mTop > b; // top of a is higher than top of b - } +bool LLTextBase::compare_top::operator()(const LLTextBase::line_info& a, const S32& b) const +{ + return a.mRect.mTop > b; // top of a is higher than top of b +} - bool operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const - { - return a.mRect.mTop > b.mRect.mTop; // top of a is higher than top of b - } -}; +bool LLTextBase::compare_top::operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const +{ + return a.mRect.mTop > b.mRect.mTop; // top of a is higher than top of b +} struct LLTextBase::line_end_compare { @@ -573,7 +566,8 @@ void LLTextBase::drawText() if ( (getSpellCheck()) && (getWText().length() > 2) ) { // Calculate start and end indices for the spell checking range - S32 start = line_start, end = getLineEnd(last_line); + S32 start = line_start; + S32 end = getLineEnd(last_line); if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) ) { |