Also removed the copy constructor and copy assignment because those only are bad news for a resource managing vector...

Sun, 05 Mar 2017 16:57:49 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 05 Mar 2017 16:57:49 +0200
changeset 1191
26b3f1e80a9c
parent 1190
2edf54a5e56a
child 1192
317f4ce38f3f

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;
 };

mercurial