summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-03-23 13:41:19 -0700
committerRichard Linden <none@none>2012-03-23 13:41:19 -0700
commitaa5bd09f1ce5406f0d1d7ac36d2fb7cb30b29fd2 (patch)
tree7cbe0ee4b572a0ad2abce05b05db505556f017ca
parent8ff4c75637ce2b9a55a65ba1fc1db3a23e7b88ec (diff)
fix for gcc
-rw-r--r--indra/newview/llfolderview.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 70899014cb..bad0d8cd8f 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -2265,14 +2265,20 @@ void LLFolderView::doIdle()
LLFolderViewItem* selected_itemp = mSelectedItems.empty() ? NULL : mSelectedItems.back();
if (!mAutoSelectOverride && (!selected_itemp || !selected_itemp->potentiallyFiltered()))
{
- applyFunctorRecursively(LLSelectFirstFilteredItem());
+ // these are named variables to get around gcc not binding non-const references to rvalues
+ // and functor application is inherently non-const to allow for stateful functors
+ LLSelectFirstFilteredItem functor;
+ applyFunctorRecursively(functor);
}
// Open filtered folders for folder views with mAutoSelectOverride=TRUE.
// Used by LLPlacesFolderView.
if (mAutoSelectOverride && !mFilter->getFilterSubString().empty())
{
- applyFunctorRecursively(LLOpenFilteredFolders());
+ // these are named variables to get around gcc not binding non-const references to rvalues
+ // and functor application is inherently non-const to allow for stateful functors
+ LLOpenFilteredFolders functor;
+ applyFunctorRecursively(functor);
}
scrollToShowSelection();