main.cpp: Fixed warnings with g_TERMINATE_EVENT_RAISED and g_SERVER_TERMINATED
This commit is contained in:
parent
ada88a5805
commit
ed01e12ed7
@ -30,8 +30,6 @@
|
|||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern bool g_TERMINATE_EVENT_RAISED;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,6 +40,8 @@ namespace Json
|
|||||||
class cRoot
|
class cRoot
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static bool g_TERMINATE_EVENT_RAISED;
|
||||||
|
|
||||||
static cRoot * Get() { return s_Root; }
|
static cRoot * Get() { return s_Root; }
|
||||||
// tolua_end
|
// tolua_end
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
||||||
// Here, we have some ALL CAPS variables, to give the impression that this is deeeep, gritty programming :P
|
// Here, we have some ALL CAPS variables, to give the impression that this is deeeep, gritty programming :P
|
||||||
bool g_TERMINATE_EVENT_RAISED = false; // If something has told the server to stop; checked periodically in cRoot
|
bool cRoot::g_TERMINATE_EVENT_RAISED = false; // If something has told the server to stop; checked periodically in cRoot
|
||||||
bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so our CTRL handler can then tell Windows to close the console
|
static bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so our CTRL handler can then tell the OS to close the console
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ bool g_ShouldLogCommOut;
|
|||||||
void NonCtrlHandler(int a_Signal)
|
void NonCtrlHandler(int a_Signal)
|
||||||
{
|
{
|
||||||
LOGD("Terminate event raised from std::signal");
|
LOGD("Terminate event raised from std::signal");
|
||||||
g_TERMINATE_EVENT_RAISED = true;
|
cRoot::g_TERMINATE_EVENT_RAISED = true;
|
||||||
|
|
||||||
switch (a_Signal)
|
switch (a_Signal)
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ LONG WINAPI LastChanceExceptionFilter(__in struct _EXCEPTION_POINTERS * a_Except
|
|||||||
// Handle CTRL events in windows, including console window close
|
// Handle CTRL events in windows, including console window close
|
||||||
BOOL CtrlHandler(DWORD fdwCtrlType)
|
BOOL CtrlHandler(DWORD fdwCtrlType)
|
||||||
{
|
{
|
||||||
g_TERMINATE_EVENT_RAISED = true;
|
cRoot::g_TERMINATE_EVENT_RAISED = true;
|
||||||
LOGD("Terminate event raised from the Windows CtrlHandler");
|
LOGD("Terminate event raised from the Windows CtrlHandler");
|
||||||
|
|
||||||
if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
|
if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
|
||||||
|
Loading…
Reference in New Issue
Block a user