diff options
author | Merov Linden <merov@lindenlab.com> | 2013-01-07 15:32:47 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-01-07 15:32:47 -0800 |
commit | 3d0ec3da5baea6bb2b9b72707a884ac7b516c4fd (patch) | |
tree | 642d19a726a5926a9845cc954e89c9301cbf4d8e /indra/newview/llinventoryfilter.cpp | |
parent | 613b7a45a783f961a38d7135eb7eeafd572b13b9 (diff) |
CHUI-659 : WIP : Verified (tested) and cleaned up some CHUI-101 refactoring code.
Diffstat (limited to 'indra/newview/llinventoryfilter.cpp')
-rw-r--r-- | indra/newview/llinventoryfilter.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index c913269aad..92f2d33073 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -42,8 +42,6 @@ #include "llclipboard.h" #include "lltrans.h" -//TODO RN: fix use of static cast as much as possible - LLFastTimer::DeclareTimer FT_FILTER_CLIPBOARD("Filter Clipboard"); LLInventoryFilter::FilterOps::FilterOps(const Params& p) @@ -83,7 +81,7 @@ LLInventoryFilter::LLInventoryFilter(const Params& p) bool LLInventoryFilter::check(const LLFolderViewModelItem* item) { - const LLFolderViewModelItemInventory* listener = static_cast<const LLFolderViewModelItemInventory*>(item); + const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item); // Clipboard cut items are *always* filtered so we need this value upfront const BOOL passed_clipboard = (listener ? checkAgainstClipboard(listener->getUUID()) : TRUE); @@ -122,7 +120,7 @@ bool LLInventoryFilter::check(const LLInventoryItem* item) bool LLInventoryFilter::checkFolder(const LLFolderViewModelItem* item) const { - const LLFolderViewModelItemInventory* listener = static_cast<const LLFolderViewModelItemInventory*>(item); + const LLFolderViewModelItemInventory* listener = dynamic_cast<const LLFolderViewModelItemInventory*>(item); if (!listener) { llerrs << "Folder view event listener not found." << llendl; @@ -384,8 +382,7 @@ const std::string& LLInventoryFilter::getFilterSubString(BOOL trim) const std::string::size_type LLInventoryFilter::getStringMatchOffset(LLFolderViewModelItem* item) const { - const LLFolderViewModelItemInventory* listener = static_cast<const LLFolderViewModelItemInventory*>(item); - return mFilterSubString.size() ? listener->getSearchableName().find(mFilterSubString) : std::string::npos; + return mFilterSubString.size() ? item->getSearchableName().find(mFilterSubString) : std::string::npos; } bool LLInventoryFilter::isDefault() const |