src/misc.h

changeset 539
72ad83a67165
parent 538
2f85d4d286e5
child 541
0e38beeb050a
equal deleted inserted replaced
538:2f85d4d286e5 539:72ad83a67165
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

mercurial