summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r--indra/newview/llinventoryfilter.cpp150
1 files changed, 75 insertions, 75 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 332c6d3085..83770e28b6 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -96,7 +96,7 @@ bool LLInventoryFilter::check(const LLFolderViewModelItem* item)
const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item);
// If it's a folder and we're showing all folders, return automatically.
- const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
+ const bool is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
if (is_folder && (mFilterOps.mShowFolderState == LLInventoryFilter::SHOW_ALL_FOLDERS))
{
return true;
@@ -297,7 +297,7 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return FALSE;
+ if (!listener) return false;
LLInventoryType::EType object_type = listener->getInventoryType();
const LLUUID object_id = listener->getUUID();
@@ -316,7 +316,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// If it has no type, pass it, unless it's a link.
if (object && object->getIsLinkType())
{
- return FALSE;
+ return false;
}
break;
case LLInventoryType::IT_UNKNOWN:
@@ -325,14 +325,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// Unknows are 255 and won't fit in 64 bits.
if (mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL)
{
- return FALSE;
+ return false;
}
break;
}
default:
if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0))
{
- return FALSE;
+ return false;
}
break;
}
@@ -342,7 +342,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
{
if (!get_is_item_worn(object_id))
{
- return FALSE;
+ return false;
}
}
@@ -351,10 +351,10 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
// Pass if this item is the target UUID or if it links to the target UUID
if (filterTypes & FILTERTYPE_UUID)
{
- if (!object) return FALSE;
+ if (!object) return false;
if (object->getLinkedUUID() != mFilterOps.mFilterUUID)
- return FALSE;
+ return false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -378,13 +378,13 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
{
if (listener->getCreationDate() < earliest ||
listener->getCreationDate() > mFilterOps.mMaxDate)
- return FALSE;
+ return false;
}
else
{
if (listener->getCreationDate() > earliest ||
listener->getCreationDate() > mFilterOps.mMaxDate)
- return FALSE;
+ return false;
}
}
@@ -397,7 +397,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
if ((object_type == LLInventoryType::IT_WEARABLE) &&
(((0x1LL << type) & mFilterOps.mFilterWearableTypes) == 0))
{
- return FALSE;
+ return false;
}
}
@@ -410,7 +410,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
if ((object_type == LLInventoryType::IT_SETTINGS) &&
(((0x1LL << type) & mFilterOps.mFilterSettingsTypes) == 0))
{
- return FALSE;
+ return false;
}
}
@@ -441,13 +441,13 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
}
if (descendents_actual == 0)
{
- return FALSE;
+ return false;
}
}
}
}
- return TRUE;
+ return true;
}
bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) const
@@ -467,7 +467,7 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons
// If it has no type, pass it, unless it's a link.
if (item && item->getIsLinkType())
{
- return FALSE;
+ return false;
}
break;
case LLInventoryType::IT_UNKNOWN:
@@ -476,14 +476,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLInventoryItem* item) cons
// Unknows are 255 and won't fit in 64 bits.
if (mFilterOps.mFilterObjectTypes != 0xffffffffffffffffULL)
{
- return FALSE;
+ return false;
}
break;
}
default:
if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0))
{
- return FALSE;
+ return false;
}
break;
}
@@ -540,7 +540,7 @@ bool LLInventoryFilter::checkAgainstClipboard(const LLUUID& object_id) const
bool LLInventoryFilter::checkAgainstPermissions(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return FALSE;
+ if (!listener) return false;
PermissionMask perm = listener->getPermissionMask();
const LLInvFVBridge *bridge = dynamic_cast<const LLInvFVBridge *>(listener);
@@ -567,18 +567,18 @@ bool LLInventoryFilter::checkAgainstPermissions(const LLInventoryItem* item) con
bool LLInventoryFilter::checkAgainstFilterLinks(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return TRUE;
+ if (!listener) return true;
const LLUUID object_id = listener->getUUID();
const LLInventoryObject *object = gInventory.getObject(object_id);
- if (!object) return TRUE;
+ if (!object) return true;
- const BOOL is_link = object->getIsLinkType();
+ const bool is_link = object->getIsLinkType();
if (is_link && (mFilterOps.mFilterLinks == FILTERLINK_EXCLUDE_LINKS))
- return FALSE;
+ return false;
if (!is_link && (mFilterOps.mFilterLinks == FILTERLINK_ONLY_LINKS))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) const
@@ -596,47 +596,47 @@ bool LLInventoryFilter::checkAgainstFilterThumbnails(const LLUUID& object_id) co
bool LLInventoryFilter::checkAgainstCreator(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener) return TRUE;
- const BOOL is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
+ if (!listener) return true;
+ const bool is_folder = listener->getInventoryType() == LLInventoryType::IT_CATEGORY;
switch (mFilterOps.mFilterCreatorType)
{
case FILTERCREATOR_SELF:
- if(is_folder) return FALSE;
+ if(is_folder) return false;
return (listener->getSearchableCreatorName() == mUsername);
case FILTERCREATOR_OTHERS:
- if(is_folder) return FALSE;
+ if(is_folder) return false;
return (listener->getSearchableCreatorName() != mUsername);
case FILTERCREATOR_ALL:
default:
- return TRUE;
+ return true;
}
}
bool LLInventoryFilter::checkAgainstSearchVisibility(const LLFolderViewModelItemInventory* listener) const
{
- if (!listener || !hasFilterString()) return TRUE;
+ if (!listener || !hasFilterString()) return true;
const LLUUID object_id = listener->getUUID();
const LLInventoryObject *object = gInventory.getObject(object_id);
- if (!object) return TRUE;
+ if (!object) return true;
- const BOOL is_link = object->getIsLinkType();
+ const bool is_link = object->getIsLinkType();
if (is_link && ((mFilterOps.mSearchVisibility & VISIBILITY_LINKS) == 0))
- return FALSE;
+ return false;
if (listener->isItemInOutfits() && ((mFilterOps.mSearchVisibility & VISIBILITY_OUTFITS) == 0))
- return FALSE;
+ return false;
if (listener->isItemInTrash() && ((mFilterOps.mSearchVisibility & VISIBILITY_TRASH) == 0))
- return FALSE;
+ return false;
if (!listener->isAgentInventory() && ((mFilterOps.mSearchVisibility & VISIBILITY_LIBRARY) == 0))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
-const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const
+const std::string& LLInventoryFilter::getFilterSubString(bool trim) const
{
return mFilterSubString;
}
@@ -964,11 +964,11 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
}
// hitting BACKSPACE, for example
- const BOOL less_restrictive = mFilterSubString.size() >= filter_sub_string_new.size()
+ 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() < filter_sub_string_new.size()
+ const bool more_restrictive = mFilterSubString.size() < filter_sub_string_new.size()
&& !filter_sub_string_new.substr(0, mFilterSubString.size()).compare(mFilterSubString);
mFilterSubString = filter_sub_string_new;
@@ -1019,8 +1019,8 @@ void LLInventoryFilter::setSearchVisibilityTypes(U32 types)
if (mFilterOps.mSearchVisibility != types)
{
// keep current items only if no perm bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mSearchVisibility & ~types);
- BOOL more_bits_set = (~mFilterOps.mSearchVisibility & types);
+ bool fewer_bits_set = (mFilterOps.mSearchVisibility & ~types);
+ bool more_bits_set = (~mFilterOps.mSearchVisibility & types);
mFilterOps.mSearchVisibility = types;
if (more_bits_set && fewer_bits_set)
@@ -1057,8 +1057,8 @@ void LLInventoryFilter::setFilterPermissions(PermissionMask perms)
if (mFilterOps.mPermissions != perms)
{
// keep current items only if no perm bits getting turned off
- BOOL fewer_bits_set = (mFilterOps.mPermissions & ~perms);
- BOOL more_bits_set = (~mFilterOps.mPermissions & perms);
+ bool fewer_bits_set = (mFilterOps.mPermissions & ~perms);
+ bool more_bits_set = (~mFilterOps.mPermissions & perms);
mFilterOps.mPermissions = perms;
if (more_bits_set && fewer_bits_set)
@@ -1101,7 +1101,7 @@ void LLInventoryFilter::setDateRange(time_t min_date, time_t max_date)
}
}
-void LLInventoryFilter::setDateRangeLastLogoff(BOOL sl)
+void LLInventoryFilter::setDateRangeLastLogoff(bool sl)
{
static LLCachedControl<U32> s_last_logoff(gSavedPerAccountSettings, "LastLogoff", 0);
if (sl && !isSinceLogoff())
@@ -1150,8 +1150,8 @@ void LLInventoryFilter::setHoursAgo(U32 hours)
bool is_increasing_from_zero = is_increasing && !mFilterOps.mHoursAgo && !isSinceLogoff();
// *NOTE: need to cache last filter time, in case filter goes stale
- BOOL less_restrictive;
- BOOL more_restrictive;
+ bool less_restrictive;
+ bool more_restrictive;
if (FILTERDATEDIRECTION_NEWER == mFilterOps.mDateSearchDirection)
{
less_restrictive = ((are_date_limits_valid && ((is_increasing && mFilterOps.mHoursAgo))) || !hours);
@@ -1314,8 +1314,8 @@ const std::string& LLInventoryFilter::getFilterText()
std::string filtered_types;
std::string not_filtered_types;
- BOOL filtered_by_type = FALSE;
- BOOL filtered_by_all_types = TRUE;
+ bool filtered_by_type = false;
+ bool filtered_by_all_types = true;
S32 num_filter_types = 0;
mFilterText.clear();
@@ -1323,158 +1323,158 @@ const std::string& LLInventoryFilter::getFilterText()
if (isFilterObjectTypesWith(LLInventoryType::IT_ANIMATION))
{
filtered_types += LLTrans::getString("Animations");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Animations");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_CALLINGCARD))
{
filtered_types += LLTrans::getString("Calling Cards");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Calling Cards");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_WEARABLE))
{
filtered_types += LLTrans::getString("Clothing");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Clothing");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_GESTURE))
{
filtered_types += LLTrans::getString("Gestures");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Gestures");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_LANDMARK))
{
filtered_types += LLTrans::getString("Landmarks");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Landmarks");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_MATERIAL))
{
filtered_types += LLTrans::getString("Materials");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Materials");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD))
{
filtered_types += LLTrans::getString("Notecards");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Notecards");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_OBJECT) && isFilterObjectTypesWith(LLInventoryType::IT_ATTACHMENT))
{
filtered_types += LLTrans::getString("Objects");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Objects");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_LSL))
{
filtered_types += LLTrans::getString("Scripts");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Scripts");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_SOUND))
{
filtered_types += LLTrans::getString("Sounds");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Sounds");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_TEXTURE))
{
filtered_types += LLTrans::getString("Textures");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Textures");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_SNAPSHOT))
{
filtered_types += LLTrans::getString("Snapshots");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Snapshots");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (isFilterObjectTypesWith(LLInventoryType::IT_SETTINGS))
{
filtered_types += LLTrans::getString("Settings");
- filtered_by_type = TRUE;
+ filtered_by_type = true;
num_filter_types++;
}
else
{
not_filtered_types += LLTrans::getString("Settings");
- filtered_by_all_types = FALSE;
+ filtered_by_all_types = false;
}
if (!LLInventoryModelBackgroundFetch::instance().folderFetchActive()