src/basics.h

changeset 818
748ba8818af8
parent 816
9adb822de7b9
child 844
11587d419d2f
equal deleted inserted replaced
817:cee9f0ecac66 818:748ba8818af8
241 template<class T> inline bool isInteger (T a) 241 template<class T> inline bool isInteger (T a)
242 { 242 {
243 return isZero (a - (int) a); 243 return isZero (a - (int) a);
244 } 244 }
245 245
246 template<class T> void removeDuplicates (QList<T>& a) 246 template<typename T>
247 void removeDuplicates (T& a)
247 { 248 {
248 std::sort (a.begin(), a.end()); 249 std::sort (a.begin(), a.end());
249 a.erase (std::unique (a.begin(), a.end()), a.end()); 250 a.erase (std::unique (a.begin(), a.end()), a.end());
250 } 251 }
251 252

mercurial