diff options
author | Mattes D <github@xoft.cz> | 2017-06-19 11:08:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 11:08:08 +0200 |
commit | 801084c38cf8534c9c0e4b38117eb95d3c5533f4 (patch) | |
tree | a43bdf18d6d66fd8a9a226d8e9b9b63c1e6265f2 | |
parent | Removed the LeakFinder for Windows. (#3777) (diff) | |
download | cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.tar cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.tar.gz cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.tar.bz2 cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.tar.lz cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.tar.xz cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.tar.zst cuberite-801084c38cf8534c9c0e4b38117eb95d3c5533f4.zip |
-rw-r--r-- | src/Bindings/LuaState.h | 6 | ||||
-rw-r--r-- | src/Globals.h | 11 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 9cbfbf69d..44d4c6448 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -77,7 +77,7 @@ public: } } - ~cStackBalanceCheck() + ~cStackBalanceCheck() NO_THROW { auto currStackPos = lua_gettop(m_LuaState); if (currStackPos != m_StackPos) @@ -117,7 +117,7 @@ public: { } - ~cStackBalancePopper() + ~cStackBalancePopper() NO_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() + ~cStackValue() NO_THROW { if (m_LuaState != nullptr) { diff --git a/src/Globals.h b/src/Globals.h index e3a537eaa..4e15473e1 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -49,7 +49,13 @@ #define SIZE_T_FMT_PRECISION(x) "%" #x "Iu" #define SIZE_T_FMT_HEX "%Ix" - #define NORETURN __declspec(noreturn) + #define NORETURN __declspec(noreturn) + #if (_MSC_VER < 1910) + // MSVC 2013 (and possibly 2015?) have no idea about "noexcept(false)" + #define NO_THROW throw(...) + #else + #define NO_THROW noexcept(false) + #endif // Use non-standard defines in <cmath> #define _USE_MATH_DEFINES @@ -93,7 +99,8 @@ #define SIZE_T_FMT_HEX "%zx" #endif - #define NORETURN __attribute((__noreturn__)) + #define NORETURN __attribute((__noreturn__)) + #define NO_THROW noexcept(false) #else |