From 9d277f1d10c1b2f929711795c85dc4ff7c3d8d3b Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 14 Jul 2020 17:57:30 +0100 Subject: cWorld * -> cWorld (#4771) * cWorld * -> cWorld --- src/World.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 860bed5d6..76c0fa3c9 100644 --- a/src/World.h +++ b/src/World.h @@ -91,6 +91,18 @@ public: return "cWorld"; } + /** Construct the world and read settings from its ini file. + @param a_DeadlockDetect is used for tracking this world's age, detecting a possible deadlock. + @param a_WorldNames is a list of all world names, used to validate linked worlds + */ + cWorld( + const AString & a_WorldName, const AString & a_DataPath, + cDeadlockDetect & a_DeadlockDetect, const AStringVector & a_WorldNames, + eDimension a_Dimension = dimOverworld, const AString & a_LinkedOverworldName = {} + ); + + virtual ~cWorld() override; + // tolua_begin /** Get whether saving chunks is enabled */ @@ -966,7 +978,7 @@ public: void GetChunkStats(int & a_NumValid, int & a_NumDirty, int & a_NumInLightingQueue); // Various queues length queries (cannot be const, they lock their CS): - inline int GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export + inline size_t GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export inline size_t GetLightingQueueLength (void) { return m_Lighting.GetQueueLength(); } // tolua_export inline size_t GetStorageLoadQueueLength(void) { return m_Storage.GetLoadQueueLength(); } // tolua_export inline size_t GetStorageSaveQueueLength(void) { return m_Storage.GetSaveQueueLength(); } // tolua_export @@ -1104,10 +1116,6 @@ public: private: - friend class cRoot; - - - class cTickThread: public cIsThread { @@ -1327,17 +1335,6 @@ private: /** Queue for the chunk data to be set into m_ChunkMap by the tick thread. Protected by m_CSSetChunkDataQueue */ cSetChunkDataPtrs m_SetChunkDataQueue; - /** Construct the world and read settings from its ini file. - @param a_DeadlockDetect is used for tracking this world's age, detecting a possible deadlock. - @param a_WorldNames is a list of all world names, used to validate linked worlds - */ - cWorld( - const AString & a_WorldName, const AString & a_DataPath, - cDeadlockDetect & a_DeadlockDetect, const AStringVector & a_WorldNames, - eDimension a_Dimension = dimOverworld, const AString & a_LinkedOverworldName = {} - ); - virtual ~cWorld() override; - void Tick(std::chrono::milliseconds a_Dt, std::chrono::milliseconds a_LastTickDurationMSec); /** Handles the weather in each tick */ -- cgit v1.2.3