1
0

NetworkSingleton: Fixed a throw warning in VS2017. (#3792)

Also fixed the misleading name.
This commit is contained in:
Mattes D 2017-06-22 21:10:41 +02:00 committed by GitHub
parent 0e1649a0f1
commit ea6660721b
4 changed files with 8 additions and 8 deletions

View File

@ -77,7 +77,7 @@ public:
} }
} }
~cStackBalanceCheck() NO_THROW ~cStackBalanceCheck() CAN_THROW
{ {
auto currStackPos = lua_gettop(m_LuaState); auto currStackPos = lua_gettop(m_LuaState);
if (currStackPos != m_StackPos) if (currStackPos != m_StackPos)
@ -117,7 +117,7 @@ public:
{ {
} }
~cStackBalancePopper() NO_THROW ~cStackBalancePopper() CAN_THROW
{ {
auto curTop = lua_gettop(m_LuaState); auto curTop = lua_gettop(m_LuaState);
if (curTop > m_Count) if (curTop > m_Count)
@ -476,7 +476,7 @@ public:
std::swap(m_StackLen, a_Src.m_StackLen); std::swap(m_StackLen, a_Src.m_StackLen);
} }
~cStackValue() NO_THROW ~cStackValue() CAN_THROW
{ {
if (m_LuaState != nullptr) if (m_LuaState != nullptr)
{ {

View File

@ -52,9 +52,9 @@
#define NORETURN __declspec(noreturn) #define NORETURN __declspec(noreturn)
#if (_MSC_VER < 1910) #if (_MSC_VER < 1910)
// MSVC 2013 (and possibly 2015?) have no idea about "noexcept(false)" // MSVC 2013 (and possibly 2015?) have no idea about "noexcept(false)"
#define NO_THROW throw(...) #define CAN_THROW throw(...)
#else #else
#define NO_THROW noexcept(false) #define CAN_THROW noexcept(false)
#endif #endif
// Use non-standard defines in <cmath> // Use non-standard defines in <cmath>
@ -118,7 +118,7 @@
#endif #endif
#define NORETURN __attribute((__noreturn__)) #define NORETURN __attribute((__noreturn__))
#define NO_THROW noexcept(false) #define CAN_THROW noexcept(false)
#else #else

View File

@ -23,7 +23,7 @@ cNetworkSingleton::cNetworkSingleton() :
cNetworkSingleton::~cNetworkSingleton() cNetworkSingleton::~cNetworkSingleton() CAN_THROW
{ {
// Check that Terminate has been called already: // Check that Terminate has been called already:
ASSERT(m_HasTerminated); ASSERT(m_HasTerminated);

View File

@ -41,7 +41,7 @@ class cNetworkSingleton
{ {
public: public:
cNetworkSingleton(); cNetworkSingleton();
~cNetworkSingleton(); ~cNetworkSingleton() CAN_THROW;
/** Returns the singleton instance of this class */ /** Returns the singleton instance of this class */
static cNetworkSingleton & Get(void); static cNetworkSingleton & Get(void);