summaryrefslogtreecommitdiffhomepage
path: root/options/metatype.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-28 03:02:57 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:48:18 +0100
commit6f04e4ca46e6f2dcd3eda63529a1bbd915f7676b (patch)
tree9aeb1332980c4285396457ad9f278495064549b5 /options/metatype.cpp
parent3be3bb256f3e9362f8889f0532f875c5ad3b41fb (diff)
clang-tidy fixes only
Maybe global `-Wcomma' is too harsh. There should be no functional changes whatsoever.
Diffstat (limited to 'options/metatype.cpp')
-rw-r--r--options/metatype.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/options/metatype.cpp b/options/metatype.cpp
index a4629aa6..3b8ec690 100644
--- a/options/metatype.cpp
+++ b/options/metatype.cpp
@@ -1,4 +1,5 @@
#include <QMetaType>
+#include "compat/macros.hpp"
namespace options::detail {
@@ -13,19 +14,15 @@ int declare_metatype_for_type(const char* str)
} // ns options::detail
-#define OPENTRACK_DEFINE_METATYPE2(t, ctr) \
- OPENTRACK_DEFINE_METATYPE3(t, ctr)
-
-#define OPENTRACK_DEFINE_METATYPE3(t, ctr) \
- OPENTRACK_DEFINE_METATYPE4(t, init_metatype_ ## ctr)
-
-#define OPENTRACK_DEFINE_METATYPE4(t, sym) \
- class sym { /* NOLINT */ \
- static const int dribble; \
- } sym; /* NOLINT */ \
+#define OPENTRACK_DEFINE_METATYPE2(t, sym) \
+ class sym { /* NOLINT */ \
+ static const int dribble; \
+ }; /* NOLINT */ \
+ static sym sym; \
const int sym :: dribble = ::options::detail::declare_metatype_for_type<t>(#t);
-#define OPENTRACK_DEFINE_METATYPE(t) OPENTRACK_DEFINE_METATYPE2(t, __COUNTER__)
+#define OPENTRACK_DEFINE_METATYPE(t) \
+ OPENTRACK_DEFINE_METATYPE2(t, PP_CAT(init, __COUNTER__))
#define OPENTRACK_METATYPE_(x) OPENTRACK_DEFINE_METATYPE(x)
#include "metatype.hpp"