From 090d8305e4e3c3ee085a897b72f2b4708e183eb8 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 5 Oct 2020 13:09:42 +0100 Subject: Warnings improvements * Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality * Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already * Reduced GetStackValue verbosity + Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness + Give SettingsRepositoryInterface a move constructor to simplify main.cpp code - Remove do {} while (false) construction in redstone handler --- src/Root.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index e055950c0..696b31ce3 100644 --- a/src/Root.h +++ b/src/Root.h @@ -62,10 +62,10 @@ public: bool Run(cSettingsRepositoryInterface & a_OverridesRepo); /** Interrupts the server and stops it, as if "/stop" typed in the console. */ - void Stop(); + static void Stop(); /** Interrupts the server and restarts it, as if "/restart" was typed in the console. */ - void Restart(); + static void Restart(); // tolua_begin cServer * GetServer(void) { return m_Server; } @@ -208,12 +208,12 @@ private: void HandleInput(); /** Performs run state transition, enforcing guarantees about state transitions. */ - void TransitionNextState(NextState a_NextState); + static void TransitionNextState(NextState a_NextState); cWorld * m_pDefaultWorld; WorldMap m_WorldsByName; - cEvent m_StopEvent; + static cEvent s_StopEvent; cServer * m_Server; cMonsterConfig * m_MonsterConfig; @@ -249,5 +249,5 @@ private: static cRoot * s_Root; /** Indicates the next action of cRoot, whether to run, stop or restart. */ - std::atomic m_NextState; + static std::atomic s_NextState; }; // tolua_export -- cgit v1.2.3