summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-01-31 12:26:23 -0500
committerOz Linden <oz@lindenlab.com>2011-01-31 12:26:23 -0500
commitbbb4fb10a50495669ec5d49da4a39950a5e2042d (patch)
tree8924813e2b9a356bc1f50ad6db9dccb683c10146 /indra/newview/llinventoryfilter.cpp
parent0d5b0cad146d2ce4a24256845b36c4eee847f7ad (diff)
parentdd859c5e3eee97db614edc94d36b25d138fa9c5c (diff)
merge changes for storm-643
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index ef4774a06d..e22363c2f6 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -393,18 +393,22 @@ void LLInventoryFilter::setFilterUUID(const LLUUID& object_id)
void LLInventoryFilter::setFilterSubString(const std::string& string)
{
- if (mFilterSubString != string)
+ std::string filter_sub_string_new = string;
+ mFilterSubStringOrig = string;
+ LLStringUtil::trimHead(filter_sub_string_new);
+ LLStringUtil::toUpper(filter_sub_string_new);
+
+ if (mFilterSubString != filter_sub_string_new)
{
// hitting BACKSPACE, for example
- const BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string);
+ const BOOL less_restrictive = mFilterSubString.size() >= filter_sub_string_new.size()
+ && !mFilterSubString.substr(0, filter_sub_string_new.size()).compare(filter_sub_string_new);
// appending new characters
- const BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString);
+ const BOOL more_restrictive = mFilterSubString.size() < filter_sub_string_new.size()
+ && !filter_sub_string_new.substr(0, mFilterSubString.size()).compare(mFilterSubString);
- mFilterSubStringOrig = string;
- LLStringUtil::trimHead(mFilterSubStringOrig);
- mFilterSubString = mFilterSubStringOrig;
- LLStringUtil::toUpper(mFilterSubString);
+ mFilterSubString = filter_sub_string_new;
if (less_restrictive)
{
setModified(FILTER_LESS_RESTRICTIVE);