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/World.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 58d814d06..fb2bdfacc 100644 --- a/src/World.h +++ b/src/World.h @@ -900,8 +900,8 @@ public: eShrapnelLevel GetTNTShrapnelLevel(void) const { return m_TNTShrapnelLevel; } void SetTNTShrapnelLevel(eShrapnelLevel a_Flag) { m_TNTShrapnelLevel = a_Flag; } - int GetMaxViewDistance(void) const { return m_MaxViewDistance; } - void SetMaxViewDistance(int a_MaxViewDistance); + unsigned GetMaxViewDistance(void) const { return m_MaxViewDistance; } + void SetMaxViewDistance(unsigned a_MaxViewDistance); bool ShouldUseChatPrefixes(void) const { return m_bUseChatPrefixes; } void SetShouldUseChatPrefixes(bool a_Flag) { m_bUseChatPrefixes = a_Flag; } @@ -1253,7 +1253,7 @@ private: eShrapnelLevel m_TNTShrapnelLevel; /** The maximum view distance that a player can have in this world. */ - int m_MaxViewDistance; + unsigned m_MaxViewDistance; /** Name of the nether world - where Nether portals should teleport. Only used when this world is an Overworld. */ -- cgit v1.2.3