NetworkSingleton: Fixed a throw warning in VS2017. (#3792)
Also fixed the misleading name.
This commit is contained in:
parent
0e1649a0f1
commit
ea6660721b
@ -77,7 +77,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
~cStackBalanceCheck() NO_THROW
|
||||
~cStackBalanceCheck() CAN_THROW
|
||||
{
|
||||
auto currStackPos = lua_gettop(m_LuaState);
|
||||
if (currStackPos != m_StackPos)
|
||||
@ -117,7 +117,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~cStackBalancePopper() NO_THROW
|
||||
~cStackBalancePopper() CAN_THROW
|
||||
{
|
||||
auto curTop = lua_gettop(m_LuaState);
|
||||
if (curTop > m_Count)
|
||||
@ -476,7 +476,7 @@ public:
|
||||
std::swap(m_StackLen, a_Src.m_StackLen);
|
||||
}
|
||||
|
||||
~cStackValue() NO_THROW
|
||||
~cStackValue() CAN_THROW
|
||||
{
|
||||
if (m_LuaState != nullptr)
|
||||
{
|
||||
|
@ -52,9 +52,9 @@
|
||||
#define NORETURN __declspec(noreturn)
|
||||
#if (_MSC_VER < 1910)
|
||||
// MSVC 2013 (and possibly 2015?) have no idea about "noexcept(false)"
|
||||
#define NO_THROW throw(...)
|
||||
#define CAN_THROW throw(...)
|
||||
#else
|
||||
#define NO_THROW noexcept(false)
|
||||
#define CAN_THROW noexcept(false)
|
||||
#endif
|
||||
|
||||
// Use non-standard defines in <cmath>
|
||||
@ -118,7 +118,7 @@
|
||||
#endif
|
||||
|
||||
#define NORETURN __attribute((__noreturn__))
|
||||
#define NO_THROW noexcept(false)
|
||||
#define CAN_THROW noexcept(false)
|
||||
|
||||
#else
|
||||
|
||||
|
@ -23,7 +23,7 @@ cNetworkSingleton::cNetworkSingleton() :
|
||||
|
||||
|
||||
|
||||
cNetworkSingleton::~cNetworkSingleton()
|
||||
cNetworkSingleton::~cNetworkSingleton() CAN_THROW
|
||||
{
|
||||
// Check that Terminate has been called already:
|
||||
ASSERT(m_HasTerminated);
|
||||
|
@ -41,7 +41,7 @@ class cNetworkSingleton
|
||||
{
|
||||
public:
|
||||
cNetworkSingleton();
|
||||
~cNetworkSingleton();
|
||||
~cNetworkSingleton() CAN_THROW;
|
||||
|
||||
/** Returns the singleton instance of this class */
|
||||
static cNetworkSingleton & Get(void);
|
||||
|
Loading…
Reference in New Issue
Block a user