diff options
Diffstat (limited to 'src/sortlist_type.h')
-rw-r--r-- | src/sortlist_type.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sortlist_type.h b/src/sortlist_type.h index 1a30c3b1a..74b6f37b3 100644 --- a/src/sortlist_type.h +++ b/src/sortlist_type.h @@ -67,7 +67,7 @@ protected: */ bool IsSortable() const { - return (this->data != NULL && this->items >= 2); + return std::vector<T>::size() >= 2; } /** @@ -240,7 +240,7 @@ public: { this->flags ^= VL_DESC; - if (this->IsSortable()) MemReverseT(this->data, this->items); + if (this->IsSortable()) MemReverseT(std::vector<T>::data(), std::vector<T>::size()); } /** @@ -270,11 +270,11 @@ public: if (this->flags & VL_FIRST_SORT) { CLRBITS(this->flags, VL_FIRST_SORT); - QSortT(this->data, this->items, compare, desc); + QSortT(std::vector<T>::data(), std::vector<T>::size(), compare, desc); return true; } - GSortT(this->data, this->items, compare, desc); + GSortT(std::vector<T>::data(), std::vector<T>::size(), compare, desc); return true; } @@ -337,8 +337,8 @@ public: if (!(this->flags & VL_FILTER)) return false; bool changed = false; - for (uint iter = 0; iter < this->items;) { - T *item = &this->data[iter]; + for (uint iter = 0; iter < std::vector<T>::size();) { + T *item = &std::vector<T>::operator[](iter); if (!decide(item, filter_data)) { this->Erase(item); changed = true; |