180 { return isZero (a - (int) a); |
180 { return isZero (a - (int) a); |
181 } |
181 } |
182 |
182 |
183 template<class T> void removeDuplicates (QList<T>& a) |
183 template<class T> void removeDuplicates (QList<T>& a) |
184 { std::sort (a.begin(), a.end()); |
184 { std::sort (a.begin(), a.end()); |
185 typename QList<T>::iterator pos = std::unique (a.begin(), a.end()); |
185 a.erase (std::unique (a.begin(), a.end()), a.end()); |
186 a.erase (pos, a.end()); |
|
187 } |
186 } |
188 |
187 |
189 #endif // LDFORGE_MISC_H |
188 #endif // LDFORGE_MISC_H |