src/misc.h

changeset 503
bebe09014dd6
parent 501
8f314f3f5054
child 504
6a1fa662bfc1
equal deleted inserted replaced
502:f6534d591f80 503:bebe09014dd6
159 159
160 template<class T> inline bool isInteger (T a) 160 template<class T> inline bool isInteger (T a)
161 { return isZero (a - (int) a); 161 { return isZero (a - (int) a);
162 } 162 }
163 163
164 template<class T> void removeDuplicates (QList<T>& a)
165 { std::sort (a.begin(), a.end());
166 typename QList<T>::iterator pos = std::unique (a.begin(), a.end());
167 a.erase (pos, a.end());
168 }
169
164 #endif // MISC_H 170 #endif // MISC_H

mercurial