1072:9ce9496427f2 | 1073:a0a0d581309b |
---|---|
19 #pragma once | 19 #pragma once |
20 #include <QString> | 20 #include <QString> |
21 #include <QObject> | 21 #include <QObject> |
22 #include <QStringList> | 22 #include <QStringList> |
23 #include <QMetaType> | 23 #include <QMetaType> |
24 #include <QSet> | |
24 #include <QVector3D> | 25 #include <QVector3D> |
25 #include <QVector> | 26 #include <QVector> |
26 #include <functional> | 27 #include <functional> |
27 #include <math.h> | 28 #include <math.h> |
28 #include "macros.h" | 29 #include "macros.h" |
243 { | 244 { |
244 return vector.size(); | 245 return vector.size(); |
245 } | 246 } |
246 | 247 |
247 template<typename T> | 248 template<typename T> |
249 int countof(const QSet<T>& set) | |
250 { | |
251 return set.size(); | |
252 } | |
253 | |
254 template<typename T> | |
248 int countof(const std::initializer_list<T>& vector) | 255 int countof(const std::initializer_list<T>& vector) |
249 { | 256 { |
250 return vector.size(); | 257 return vector.size(); |
251 } | 258 } |