summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewmodel.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-02-02 21:51:07 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-02-02 21:51:07 +0200
commit7a5381b39f0b23649103f393a6d48ad1ab88a2bb (patch)
treecf6aa4a5f25f2116afa346241ae2d9532b959dd3 /indra/llui/llfolderviewmodel.h
parent6dec98a14ca052a3600556815e6b215eed15e97d (diff)
parent8d21d29bd7fa038db632ff90fb0e1207d0713ca2 (diff)
Merge branch 'main' into DRTVWR-573-maint-R
Diffstat (limited to 'indra/llui/llfolderviewmodel.h')
-rw-r--r--indra/llui/llfolderviewmodel.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index 618169a8fe..c5e027d314 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -419,21 +419,15 @@ public:
mFilter(filter)
{}
- virtual ~LLFolderViewModel()
- {
- delete mSorter;
- mSorter = NULL;
- delete mFilter;
- mFilter = NULL;
- }
+ virtual ~LLFolderViewModel() {}
virtual SortType& getSorter() { return *mSorter; }
virtual const SortType& getSorter() const { return *mSorter; }
- virtual void setSorter(const SortType& sorter) { mSorter = new SortType(sorter); requestSortAll(); }
+ virtual void setSorter(const SortType& sorter) { mSorter.reset(new SortType(sorter)); requestSortAll(); }
virtual FilterType& getFilter() { return *mFilter; }
virtual const FilterType& getFilter() const { return *mFilter; }
- virtual void setFilter(const FilterType& filter) { mFilter = new FilterType(filter); }
+ virtual void setFilter(const FilterType& filter) { mFilter.reset(new FilterType(filter)); }
// By default, we assume the content is available. If a network fetch mechanism is implemented for the model,
// this method needs to be overloaded and return the relevant fetch status.
@@ -471,8 +465,8 @@ public:
}
protected:
- SortType* mSorter;
- FilterType* mFilter;
+ std::unique_ptr<SortType> mSorter;
+ std::unique_ptr<FilterType> mFilter;
};
#endif // LLFOLDERVIEWMODEL_H