From c517863b9c0e19507eafc8842e1e68379e6122a9 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 20 Jun 2012 19:17:54 -0700 Subject: CHUI-101 WIP Make LLFolderView general purpose build fix for gcc --- indra/newview/llfolderviewitem.h | 5 ++--- indra/newview/llfolderviewmodel.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 1f8c12cf73..feba32e31d 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -464,7 +464,6 @@ public: std::string& tooltip_msg); virtual void draw(); - folders_t::iterator getFoldersBegin() { return mFolders.begin(); } folders_t::iterator getFoldersEnd() { return mFolders.end(); } folders_t::size_type getFoldersCount() const { return mFolders.size(); } @@ -478,8 +477,8 @@ public: public: //WARNING: do not call directly...use the appropriate LLFolderViewModel-derived class instead - template void sortFolders(SORT_FUNC& func) { mFolders.sort(func); } - template void sortItems(SORT_FUNC& func) { mItems.sort(func); } + template void sortFolders(const SORT_FUNC& func) { mFolders.sort(func); } + template void sortItems(const SORT_FUNC& func) { mItems.sort(func); } }; diff --git a/indra/newview/llfolderviewmodel.h b/indra/newview/llfolderviewmodel.h index 946943530a..930c26384c 100644 --- a/indra/newview/llfolderviewmodel.h +++ b/indra/newview/llfolderviewmodel.h @@ -255,12 +255,12 @@ public: : mSorter(sorter) {} - bool operator () (const LLFolderViewItem* a, const LLFolderViewItem* b) + bool operator () (const LLFolderViewItem* a, const LLFolderViewItem* b) const { return mSorter(static_cast(a->getViewModelItem()), static_cast(b->getViewModelItem())); } - bool operator () (const LLFolderViewFolder* a, const LLFolderViewFolder* b) + bool operator () (const LLFolderViewFolder* a, const LLFolderViewFolder* b) const { return mSorter(static_cast(a->getViewModelItem()), static_cast(b->getViewModelItem())); } -- cgit v1.2.3