| 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 |