Sun, 05 Mar 2017 16:57:49 +0200
Also removed the copy constructor and copy assignment because those only are bad news for a resource managing vector...
src/types/resourcevector.h | file | annotate | diff | comparison | revisions |
--- a/src/types/resourcevector.h Sun Mar 05 16:55:48 2017 +0200 +++ b/src/types/resourcevector.h Sun Mar 05 16:57:49 2017 +0200 @@ -29,6 +29,8 @@ using Filter = std::function<bool(T*, int)>; using Callback = std::function<void(T*, int)>; + ResourceVector() = default; + ResourceVector(const ResourceVector<T>&) = delete; ~ResourceVector(); void append(T) = delete; @@ -50,6 +52,8 @@ void merge(ResourceVector<T>& other, int position = -1, Filter filter = nullptr, Callback callback = nullptr); const QVector<T*>& toQVector() const; + void operator=(const ResourceVector<T>&) = delete; + private: QVector<T*> _data; };