--- a/src/basics.h Sat Jan 28 17:47:06 2017 +0200 +++ b/src/basics.h Sun Jan 29 15:05:14 2017 +0200 @@ -21,6 +21,7 @@ #include <QObject> #include <QStringList> #include <QMetaType> +#include <QSet> #include <QVector3D> #include <QVector> #include <functional> @@ -245,6 +246,12 @@ } template<typename T> +int countof(const QSet<T>& set) +{ + return set.size(); +} + +template<typename T> int countof(const std::initializer_list<T>& vector) { return vector.size();