From 6d5a8892f34f4034b38da467268de9d489e1024e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 19 Oct 2014 00:29:34 +0100 Subject: Use std::thread --- src/Root.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index 84c6a98ec..7c7798315 100644 --- a/src/Root.h +++ b/src/Root.h @@ -174,7 +174,7 @@ private: cCriticalSection m_CSPendingCommands; cCommandQueue m_PendingCommands; - cThread * m_InputThread; + std::thread m_InputThread; cServer * m_Server; cMonsterConfig * m_MonsterConfig; @@ -207,10 +207,10 @@ private: /// Does the actual work of executing a command void DoExecuteConsoleCommand(const AString & a_Cmd); - - static void InputThread(void* a_Params); static cRoot* s_Root; + + static void InputThread(cRoot * a_Params); }; // tolua_export -- cgit v1.2.3 From aa19a3afb0b94e8b5fe055eeb38b1fb2ee1a67b0 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 19 Oct 2014 14:10:18 +0100 Subject: Migrated random generators to std::random --- src/Root.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index 85800a4a8..c6bea4902 100644 --- a/src/Root.h +++ b/src/Root.h @@ -210,7 +210,7 @@ private: static cRoot* s_Root; - static void InputThread(cRoot * a_Params); + static void InputThread(cRoot & a_Params); }; // tolua_export -- cgit v1.2.3 From 51fa6b4090ee930d03592550613592b1087fb788 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 23 Oct 2014 23:58:01 +0100 Subject: Suggestions --- src/Root.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index c6bea4902..2860c1ce2 100644 --- a/src/Root.h +++ b/src/Root.h @@ -6,6 +6,7 @@ #include "HTTPServer/HTTPServer.h" #include "Defines.h" #include "RankManager.h" +#include -- cgit v1.2.3 From d8d3b9aec5bbb0f6d632d86f1fb7b1e8f58e9063 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 00:12:48 -0800 Subject: Moved the check into a new function and just calls that function and a blank FindAndDoWithPlayer added. --- src/Root.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index 29753a47d..b926b36bc 100644 --- a/src/Root.h +++ b/src/Root.h @@ -128,7 +128,9 @@ public: /** Finds the player over his uuid and calls the callback */ bool DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << - + + bool FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); + // tolua_begin /// Sends a chat message to all connected clients (in all worlds) -- cgit v1.2.3 From 6de07d4a39096f19c075695824aa87a1907e4edc Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 00:45:29 -0800 Subject: Fixed compile errors --- src/Root.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index b926b36bc..b3cde8748 100644 --- a/src/Root.h +++ b/src/Root.h @@ -129,7 +129,7 @@ public: /** Finds the player over his uuid and calls the callback */ bool DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << - bool FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); + bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // tolua_begin -- cgit v1.2.3 From 12c012fa01e719c7c103e36ae0407294a0d11bfb Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 14:33:59 -0800 Subject: Changed CheckMultiLogin() to not have main body wrapped in an if statement. Added in indent to cPlayerListCallBack in cCallback class inside CheckMultiLogin(). Added doxy-comment for DoWithPlayer(). Changed comments on IsPlayerInQueue() and IsAllowMultiLogin() to doxy-comments. --- src/Root.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Root.h') diff --git a/src/Root.h b/src/Root.h index b3cde8748..af5a2b47b 100644 --- a/src/Root.h +++ b/src/Root.h @@ -129,6 +129,7 @@ public: /** Finds the player over his uuid and calls the callback */ bool DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback & a_Callback); // >> EXPORTED IN MANUALBINDINGS << + /** Finds the player using it's complete username and calls the callback */ bool DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback); // tolua_begin -- cgit v1.2.3