summaryrefslogtreecommitdiff
path: root/modules/websocket
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-21 12:48:48 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-21 12:48:58 +0200
commit5408af1407581fe8c0aebb425ef5148bf27e1b15 (patch)
tree85119bb5818f3d78050b2411e68b4bd79102f037 /modules/websocket
parent307f560b39439042614f206cc28c80dd543b69cf (diff)
Style: Ensure consistent formatting with clang-format 15
When going from version 14 to 15 it would introduce a tiny change in `websocket_macros.h` just before the comment re-enabling clang-format, but this can be solved by just letting it do its work. Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't used, and bump recommended versions for pre-commit hook to [13; 15].
Diffstat (limited to 'modules/websocket')
-rw-r--r--modules/websocket/websocket_macros.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/modules/websocket/websocket_macros.h b/modules/websocket/websocket_macros.h
index a01ae65c56..b03bd8f45c 100644
--- a/modules/websocket/websocket_macros.h
+++ b/modules/websocket/websocket_macros.h
@@ -35,34 +35,32 @@
#define DEF_PKT_SHIFT 10
#define DEF_BUF_SHIFT 16
-/* clang-format off */
-#define GDCICLASS(CNAME) \
-public:\
- static CNAME *(*_create)();\
-\
- static Ref<CNAME > create_ref() {\
-\
- if (!_create)\
- return Ref<CNAME >();\
- return Ref<CNAME >(_create());\
- }\
-\
- static CNAME *create() {\
-\
- if (!_create)\
- return nullptr;\
- return _create();\
- }\
-protected:\
+#define GDCICLASS(CNAME) \
+public: \
+ static CNAME *(*_create)(); \
+ \
+ static Ref<CNAME> create_ref() { \
+ if (!_create) \
+ return Ref<CNAME>(); \
+ return Ref<CNAME>(_create()); \
+ } \
+ \
+ static CNAME *create() { \
+ if (!_create) \
+ return nullptr; \
+ return _create(); \
+ } \
+ \
+protected:
#define GDCINULL(CNAME) \
-CNAME *(*CNAME::_create)() = nullptr;
+ CNAME *(*CNAME::_create)() = nullptr;
-#define GDCIIMPL(IMPNAME, CNAME) \
-public:\
- static CNAME *_create() { return memnew(IMPNAME); }\
- static void make_default() { CNAME::_create = IMPNAME::_create; }\
-protected:\
-/* clang-format on */
+#define GDCIIMPL(IMPNAME, CNAME) \
+public: \
+ static CNAME *_create() { return memnew(IMPNAME); } \
+ static void make_default() { CNAME::_create = IMPNAME::_create; } \
+ \
+protected:
#endif // WEBSOCKET_MACROS_H