diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:19:54 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-04 16:19:54 +0100 |
commit | ad148587dcf5244c2d2011dba339786c765c54c4 (patch) | |
tree | bdd914121cd326da2ed26679838878e3edffc841 /src/script/cpp_api/s_internal.h | |
parent | 1145b05ea0bda87dc0827821385810eced08f774 (diff) | |
download | dragonfireclient-ad148587dcf5244c2d2011dba339786c765c54c4.tar.xz |
Make Lint Happy
Diffstat (limited to 'src/script/cpp_api/s_internal.h')
-rw-r--r-- | src/script/cpp_api/s_internal.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/script/cpp_api/s_internal.h b/src/script/cpp_api/s_internal.h index 83b3b9d27..858b827de 100644 --- a/src/script/cpp_api/s_internal.h +++ b/src/script/cpp_api/s_internal.h @@ -34,13 +34,14 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifdef SCRIPTAPI_LOCK_DEBUG #include <cassert> -class LockChecker { +class LockChecker +{ public: LockChecker(int *recursion_counter, std::thread::id *owning_thread) { m_lock_recursion_counter = recursion_counter; - m_owning_thread = owning_thread; - m_original_level = *recursion_counter; + m_owning_thread = owning_thread; + m_original_level = *recursion_counter; if (*m_lock_recursion_counter > 0) { assert(*m_owning_thread == std::this_thread::get_id()); @@ -67,19 +68,18 @@ private: std::thread::id *m_owning_thread; }; -#define SCRIPTAPI_LOCK_CHECK \ - LockChecker scriptlock_checker( \ - &this->m_lock_recursion_count, \ - &this->m_owning_thread) +#define SCRIPTAPI_LOCK_CHECK \ + LockChecker scriptlock_checker( \ + &this->m_lock_recursion_count, &this->m_owning_thread) #else - #define SCRIPTAPI_LOCK_CHECK while(0) +#define SCRIPTAPI_LOCK_CHECK while (0) #endif -#define SCRIPTAPI_PRECHECKHEADER \ - RecursiveMutexAutoLock scriptlock(this->m_luastackmutex); \ - SCRIPTAPI_LOCK_CHECK; \ - realityCheck(); \ - lua_State *L = getStack(); \ - assert(lua_checkstack(L, 20)); \ - StackUnroller stack_unroller(L); +#define SCRIPTAPI_PRECHECKHEADER \ + RecursiveMutexAutoLock scriptlock(this->m_luastackmutex); \ + SCRIPTAPI_LOCK_CHECK; \ + realityCheck(); \ + lua_State *L = getStack(); \ + assert(lua_checkstack(L, 20)); \ + StackUnroller stack_unroller(L); |