src/misc.h

changeset 503
bebe09014dd6
parent 501
8f314f3f5054
child 504
6a1fa662bfc1
--- a/src/misc.h	Wed Oct 16 16:05:51 2013 +0300
+++ b/src/misc.h	Wed Oct 16 16:40:42 2013 +0300
@@ -161,4 +161,10 @@
 {	return isZero (a - (int) a);
 }
 
+template<class T> void removeDuplicates (QList<T>& a)
+{	std::sort (a.begin(), a.end());
+	typename QList<T>::iterator pos = std::unique (a.begin(), a.end());
+	a.erase (pos, a.end());
+}
+
 #endif // MISC_H

mercurial