aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_internal.h
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:57:41 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-11-04 16:57:41 +0100
commit6ccb5835ff55d85156be91473c598eca9d6cb9a6 (patch)
tree7f1eaf8b94694c8e24e206909ba8f55a1ebfbb3e /src/script/lua_api/l_internal.h
parent244713971a976e43e8740b6a9d9d122e37020ef2 (diff)
downloaddragonfireclient-6ccb5835ff55d85156be91473c598eca9d6cb9a6.tar.xz
Revert "Make Lint Happy"
This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4.
Diffstat (limited to 'src/script/lua_api/l_internal.h')
-rw-r--r--src/script/lua_api/l_internal.h41
1 files changed, 18 insertions, 23 deletions
diff --git a/src/script/lua_api/l_internal.h b/src/script/lua_api/l_internal.h
index 378d19cd0..a86eeaf79 100644
--- a/src/script/lua_api/l_internal.h
+++ b/src/script/lua_api/l_internal.h
@@ -28,12 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "common/c_internal.h"
-#define luamethod(class, name) \
- { \
-#name, class ::l_##name \
- }
-#define luamethod_aliased(class, name, alias) \
- {#name, class ::l_##name}, { #alias, class ::l_##name }
+#define luamethod(class, name) {#name, class::l_##name}
+#define luamethod_aliased(class, name, alias) {#name, class::l_##name}, {#alias, class::l_##name}
#define API_FCT(name) registerFunction(L, #name, l_##name, top)
// For future use
@@ -43,33 +39,32 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* In debug mode ensure no code tries to retrieve the server env when it isn't
* actually available (in CSM) */
#if !defined(SERVER) && !defined(NDEBUG)
-#define DEBUG_ASSERT_NO_CLIENTAPI \
- FATAL_ERROR_IF(getClient(L) != nullptr, \
- "Tried " \
- "to retrieve ServerEnvironment on client")
+#define DEBUG_ASSERT_NO_CLIENTAPI \
+ FATAL_ERROR_IF(getClient(L) != nullptr, "Tried " \
+ "to retrieve ServerEnvironment on client")
#else
#define DEBUG_ASSERT_NO_CLIENTAPI ((void)0)
#endif
// Retrieve ServerEnvironment pointer as `env` (no map lock)
-#define GET_ENV_PTR_NO_MAP_LOCK \
- DEBUG_ASSERT_NO_CLIENTAPI; \
- ServerEnvironment *env = (ServerEnvironment *)getEnv(L); \
- if (env == NULL) \
- return 0
+#define GET_ENV_PTR_NO_MAP_LOCK \
+ DEBUG_ASSERT_NO_CLIENTAPI; \
+ ServerEnvironment *env = (ServerEnvironment *)getEnv(L); \
+ if (env == NULL) \
+ return 0
// Retrieve ServerEnvironment pointer as `env`
-#define GET_ENV_PTR \
- MAP_LOCK_REQUIRED; \
+#define GET_ENV_PTR \
+ MAP_LOCK_REQUIRED; \
GET_ENV_PTR_NO_MAP_LOCK
// Retrieve Environment pointer as `env` (no map lock)
-#define GET_PLAIN_ENV_PTR_NO_MAP_LOCK \
- Environment *env = (Environment *)getEnv(L); \
- if (env == NULL) \
- return 0
+#define GET_PLAIN_ENV_PTR_NO_MAP_LOCK \
+ Environment *env = (Environment *)getEnv(L); \
+ if (env == NULL) \
+ return 0
// Retrieve Environment pointer as `env`
-#define GET_PLAIN_ENV_PTR \
- MAP_LOCK_REQUIRED; \
+#define GET_PLAIN_ENV_PTR \
+ MAP_LOCK_REQUIRED; \
GET_PLAIN_ENV_PTR_NO_MAP_LOCK