1
0
Fork 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);
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)
{

View File

@ -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

View File

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

View File

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