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);
|
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)
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user