summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-20 01:46:04 +0200
committerMattes D <github@xoft.cz>2014-07-20 01:46:04 +0200
commit0e608b284480f9f4fe175f901080308136e9abc3 (patch)
treed4a1de7b55cfca5d80f9b0c8fce0e34192d0d9b3 /src/Root.cpp
parentMonsters: Made IsUndead overridable by the respective mob classes (diff)
parentmain.cpp: field style fixes (diff)
downloadcuberite-0e608b284480f9f4fe175f901080308136e9abc3.tar
cuberite-0e608b284480f9f4fe175f901080308136e9abc3.tar.gz
cuberite-0e608b284480f9f4fe175f901080308136e9abc3.tar.bz2
cuberite-0e608b284480f9f4fe175f901080308136e9abc3.tar.lz
cuberite-0e608b284480f9f4fe175f901080308136e9abc3.tar.xz
cuberite-0e608b284480f9f4fe175f901080308136e9abc3.tar.zst
cuberite-0e608b284480f9f4fe175f901080308136e9abc3.zip
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 6347adcf0..ba25b97eb 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -30,8 +30,6 @@
#include <mach/mach.h>
#endif
-extern bool g_TERMINATE_EVENT_RAISED;
-
@@ -79,7 +77,7 @@ void cRoot::InputThread(void * a_Params)
cLogCommandOutputCallback Output;
- while (!self.m_bStop && !self.m_bRestart && !g_TERMINATE_EVENT_RAISED && std::cin.good())
+ while (!self.m_bStop && !self.m_bRestart && !m_TerminateEventRaised && std::cin.good())
{
AString Command;
std::getline(std::cin, Command);
@@ -89,7 +87,7 @@ void cRoot::InputThread(void * a_Params)
}
}
- if (g_TERMINATE_EVENT_RAISED || !std::cin.good())
+ if (m_TerminateEventRaised || !std::cin.good())
{
// We have come here because the std::cin has received an EOF / a terminate signal has been sent, and the server is still running; stop the server:
self.m_bStop = true;
@@ -205,12 +203,12 @@ void cRoot::Start(void)
EnableMenuItem(hmenu, SC_CLOSE, MF_ENABLED); // Re-enable close button
#endif
- while (!m_bStop && !m_bRestart && !g_TERMINATE_EVENT_RAISED) // These are modified by external threads
+ while (!m_bStop && !m_bRestart && !m_TerminateEventRaised) // These are modified by external threads
{
cSleep::MilliSleep(1000);
}
- if (g_TERMINATE_EVENT_RAISED)
+ if (m_TerminateEventRaised)
{
m_bStop = true;
}