Fix a warning reported by clang
authorLoic Blot <loic.blot@unix-experience.fr>
Thu, 29 Mar 2018 11:36:01 +0000 (13:36 +0200)
committerLoic Blot <loic.blot@unix-experience.fr>
Thu, 29 Mar 2018 11:37:24 +0000 (13:37 +0200)
minetest/src/script/cpp_api/s_player.h:27:1: warning: struct 'PlayerHPChangeReason' was previously declared as a class [-Wmismatched-tags]
struct PlayerHPChangeReason;

src/script/cpp_api/s_base.h

index dc7b581e39f6555a3f21c8e9a472f99465c74b8c..6f61b6b843473c47b69e29e9d1d19cc1846c90cd 100644 (file)
@@ -72,7 +72,7 @@ class IGameDef;
 class Environment;
 class GUIEngine;
 class ServerActiveObject;
-class PlayerHPChangeReason;
+struct PlayerHPChangeReason;
 
 class ScriptApiBase {
 public:
@@ -146,7 +146,7 @@ protected:
        std::string     m_last_run_mod;
        bool            m_secure = false;
 #ifdef SCRIPTAPI_LOCK_DEBUG
-       int             m_lock_recursion_count;
+       int             m_lock_recursion_count{};
        std::thread::id m_owning_thread;
 #endif