From 464821592c4273cbbff6607e2c1fd19c9f0240fe Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Tue, 23 Oct 2018 21:29:28 +0300 Subject: [PATCH] Remove traces of noexcept from the binding library. This would've impaired the exception handling required by the binding system and cause a program termination for even the slightest error that occured from the script. --- include/sqrat/sqratFunction.h | 30 ++++++++--------- include/sqrat/sqratGlobalMethods.h | 24 +++++++------- include/sqrat/sqratMemberMethods.h | 48 ++++++++++++++-------------- include/sqrat/sqratOverloadMethods.h | 16 +++++----- include/sqrat/sqratTypes.h | 8 ++--- include/sqrat/sqratUtil.h | 38 +++++++++++----------- 6 files changed, 82 insertions(+), 82 deletions(-) diff --git a/include/sqrat/sqratFunction.h b/include/sqrat/sqratFunction.h index 26a9fbf3..71ff3df9 100644 --- a/include/sqrat/sqratFunction.h +++ b/include/sqrat/sqratFunction.h @@ -50,17 +50,17 @@ struct Function { HSQOBJECT mEnv, mObj; // Default constructor (null) - Function() noexcept { + Function() { sq_resetobject(&mEnv); sq_resetobject(&mObj); } // Copy constructor - Function(const Function& sf) noexcept : mEnv(sf.mEnv), mObj(sf.mObj) { + Function(const Function& sf) : mEnv(sf.mEnv), mObj(sf.mObj) { sq_addref(DefaultVM::Get_(), &mEnv); sq_addref(DefaultVM::Get_(), &mObj); } // Move constructor - Function(Function&& sf) noexcept : mEnv(sf.mEnv), mObj(sf.mObj) { + Function(Function&& sf) : mEnv(sf.mEnv), mObj(sf.mObj) { sq_resetobject(&sf.GetEnv()); sq_resetobject(&sf.GetFunc()); } @@ -93,7 +93,7 @@ struct Function { #endif } // Constructs a Function from two Squirrel objects (one is the environment object and the other is the function object) - Function(HSQUIRRELVM vm, HSQOBJECT e, HSQOBJECT o) noexcept : mEnv(e), mObj(o) { + Function(HSQUIRRELVM vm, HSQOBJECT e, HSQOBJECT o) : mEnv(e), mObj(o) { sq_addref(vm, &mEnv); sq_addref(vm, &mObj); } @@ -102,7 +102,7 @@ struct Function { Release(); } // Copy Assignment operator - Function& operator=(const Function& sf) noexcept { + Function& operator=(const Function& sf) { Release(); mEnv = sf.mEnv; mObj = sf.mObj; @@ -113,7 +113,7 @@ struct Function { return *this; } // Move Assignment operator - Function& operator=(Function&& sf) noexcept { + Function& operator=(Function&& sf) { Release(); mEnv = sf.mEnv; mObj = sf.mObj; @@ -122,31 +122,31 @@ struct Function { return *this; } // Checks whether the Function is null - bool IsNull() const noexcept { + bool IsNull() const { return sq_isnull(mObj); } // Gets the Squirrel environment object for this Function (copy) - HSQOBJECT GetEnv() const noexcept { + HSQOBJECT GetEnv() const { return mEnv; } // Gets the Squirrel environment object for this Function (reference) - HSQOBJECT& GetEnv() noexcept { + HSQOBJECT& GetEnv() { return mEnv; } // Gets the Squirrel function object for this Function (copy) - HSQOBJECT GetFunc() const noexcept { + HSQOBJECT GetFunc() const { return mObj; } // Gets the Squirrel function object for this Function (reference) - HSQOBJECT& GetFunc() noexcept { + HSQOBJECT& GetFunc() { return mObj; } // Gets the Squirrel VM for this Function - HSQUIRRELVM GetVM() const noexcept { + HSQUIRRELVM GetVM() const { return DefaultVM::Get_(); } // Sets the Function to null (removing its references to underlying Squirrel objects) - void Release() noexcept { + void Release() { if(!IsNull()) { sq_release(DefaultVM::Get_(), &mEnv); sq_release(DefaultVM::Get_(), &mObj); @@ -157,7 +157,7 @@ struct Function { // Sets the Function to null (removing its references to underlying Squirrel objects) // This doesn't call release if the reference count is 1. // Workaround for some weird squirrel behavior that generates an assert in debug mode. - void ReleaseGently() noexcept { + void ReleaseGently() { if(!IsNull()) { sq_release(DefaultVM::Get_(), &mEnv); if (sq_getrefcount(DefaultVM::Get_(), &mObj) > 1) { @@ -256,7 +256,7 @@ template<> struct Var { Var(HSQUIRRELVM vm, SQInteger idx) : value(vm, idx) { } // Called by Sqrat::PushVar to put a Function on the stack - static void push(HSQUIRRELVM vm, const Function& value) noexcept { + static void push(HSQUIRRELVM vm, const Function& value) { sq_pushobject(vm, value.GetFunc()); } }; diff --git a/include/sqrat/sqratGlobalMethods.h b/include/sqrat/sqratGlobalMethods.h index 5ee86644..0bdf2497 100644 --- a/include/sqrat/sqratGlobalMethods.h +++ b/include/sqrat/sqratGlobalMethods.h @@ -94,12 +94,12 @@ template <> struct SqGlobalProxy { }; template struct SqGlobalParamCheck { - static inline bool Invalid(SQInteger top, SQInteger count) noexcept { + static inline bool Invalid(SQInteger top, SQInteger count) { return top != count; } }; template<> struct SqGlobalParamCheck { - static inline bool Invalid(SQInteger top, SQInteger count) noexcept { + static inline bool Invalid(SQInteger top, SQInteger count) { return top < (count - 1); } }; @@ -109,8 +109,8 @@ template<> struct SqGlobalParamCheck { // template struct SqGlobal { // Function proxy - template static SQFUNCTION GetProxy() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxy() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), startIdx + sizeof...(A))) { @@ -135,8 +135,8 @@ template struct SqGlobal { template struct SqGlobal { // Function proxy - template static SQFUNCTION GetProxy() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxy() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), startIdx + sizeof...(A))) { @@ -161,8 +161,8 @@ template struct SqGlobal { template <> struct SqGlobal { // Function proxy - template static SQFUNCTION GetProxy() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxy() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), startIdx + sizeof...(A))) { @@ -182,22 +182,22 @@ template <> struct SqGlobal { }; // Global Function Resolver -template SQFUNCTION SqGlobalFunc(R (* /*method*/)(A...)) noexcept { +template SQFUNCTION SqGlobalFunc(R (* /*method*/)(A...)) { return SqGlobal::template GetProxy<2, false, A...>(); } // Global Function Resolver -template SQFUNCTION SqGlobalFunc(R& (* /*method*/)(A...)) noexcept { +template SQFUNCTION SqGlobalFunc(R& (* /*method*/)(A...)) { return SqGlobal::template GetProxy<2, false, A...>(); } // Member Global Function Resolver -template SQFUNCTION SqMemberGlobalFunc(R (* /*method*/)(T, A...)) noexcept { +template SQFUNCTION SqMemberGlobalFunc(R (* /*method*/)(T, A...)) { return SqGlobal::template GetProxy<1, false, T, A...>(); } // Member Global Function Resolver -template SQFUNCTION SqMemberGlobalFunc(R& (* /*method*/)(T, A...)) noexcept { +template SQFUNCTION SqMemberGlobalFunc(R& (* /*method*/)(T, A...)) { return SqGlobal::template GetProxy<1, false, T, A...>(); } diff --git a/include/sqrat/sqratMemberMethods.h b/include/sqrat/sqratMemberMethods.h index 5eae8817..80ed7af0 100644 --- a/include/sqrat/sqratMemberMethods.h +++ b/include/sqrat/sqratMemberMethods.h @@ -45,7 +45,7 @@ namespace Sqrat { // Squirrel Member Functions // template struct SqMemberProxy { - template static SQInteger Run(HSQUIRRELVM vm) noexcept { + template static SQInteger Run(HSQUIRRELVM vm) { ArgFwd a{SQ_OK}; a.Call(vm, 2, [](HSQUIRRELVM vm, A... a) { typedef R(C::*M)(A...); @@ -58,7 +58,7 @@ template struct SqMemberProxy { }); return SQ_FAILED(a.mRes) ? a.mRes : 1; } - template static SQInteger RunC(HSQUIRRELVM vm) noexcept { + template static SQInteger RunC(HSQUIRRELVM vm) { ArgFwd a{SQ_OK}; a.Call(vm, 2, [](HSQUIRRELVM vm, A... a) { typedef R(C::*M)(A...) const; @@ -78,7 +78,7 @@ template struct SqMemberProxy { // template struct SqMemberProxy { - template static SQInteger Run(HSQUIRRELVM vm) noexcept { + template static SQInteger Run(HSQUIRRELVM vm) { ArgFwd a{SQ_OK}; a.Call(vm, 2, [](HSQUIRRELVM vm, A... a) { typedef R&(C::*M)(A...); @@ -91,7 +91,7 @@ template struct SqMemberProxy { }); return SQ_FAILED(a.mRes) ? a.mRes : 1; } - template static SQInteger RunC(HSQUIRRELVM vm) noexcept { + template static SQInteger RunC(HSQUIRRELVM vm) { ArgFwd a{SQ_OK}; a.Call(vm, 2, [](HSQUIRRELVM vm, A... a) { typedef R&(C::*M)(A...) const; @@ -111,7 +111,7 @@ template struct SqMemberProxy { // template struct SqMemberProxy { - template static SQInteger Run(HSQUIRRELVM vm) noexcept { + template static SQInteger Run(HSQUIRRELVM vm) { ArgFwd a{SQ_OK}; a.Call(vm, 2, [](HSQUIRRELVM vm, A... a) { typedef void(C::*M)(A...); @@ -123,7 +123,7 @@ template struct SqMemberProxy { }); return SQ_FAILED(a.mRes) ? a.mRes : 0; } - template static SQInteger RunC(HSQUIRRELVM vm) noexcept { + template static SQInteger RunC(HSQUIRRELVM vm) { ArgFwd a{SQ_OK}; a.Call(vm, 2, [](HSQUIRRELVM vm, A... a) { typedef void(C::*M)(A...) const; @@ -138,12 +138,12 @@ template struct SqMemberProxy { }; template struct SqMemberParamCheck { - static inline bool Invalid(SQInteger top, SQInteger count) noexcept { + static inline bool Invalid(SQInteger top, SQInteger count) { return top != count; } }; template<> struct SqMemberParamCheck { - static inline bool Invalid(SQInteger top, SQInteger count) noexcept { + static inline bool Invalid(SQInteger top, SQInteger count) { return top < count; } }; @@ -153,8 +153,8 @@ template<> struct SqMemberParamCheck { // template struct SqMember { // Function proxy - template static SQFUNCTION GetProxy() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxy() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), 2 + sizeof...(A))) { @@ -172,8 +172,8 @@ template struct SqMember { }; } // Function proxy - template static SQFUNCTION GetProxyC() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxyC() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), 2 + sizeof...(A))) { @@ -198,8 +198,8 @@ template struct SqMember { template struct SqMember { // Function proxy - template static SQFUNCTION GetProxy() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxy() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), 2 + sizeof...(A))) { @@ -217,8 +217,8 @@ template struct SqMember { }; } // Function proxy - template static SQFUNCTION GetProxyC() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxyC() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), 2 + sizeof...(A))) { @@ -244,8 +244,8 @@ template struct SqMember { template struct SqMember { // Function proxy - template static SQFUNCTION GetProxy() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxy() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), 2 + sizeof...(A))) { @@ -263,8 +263,8 @@ template struct SqMember { }; } // Function proxy - template static SQFUNCTION GetProxyC() noexcept { - return +[](HSQUIRRELVM vm) noexcept -> SQInteger { + template static SQFUNCTION GetProxyC() { + return +[](HSQUIRRELVM vm) -> SQInteger { #if !defined (SCRAT_NO_ERROR_CHECKING) if (!SQRAT_CONST_CONDITION(overloaded) && SqGlobalParamCheck< ArgFwd::HASFMT >::Invalid(sq_gettop(vm), 2 + sizeof...(A))) { @@ -284,22 +284,22 @@ template struct SqMember { }; // Member Function Resolver -template SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A...)) noexcept { +template SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A...)) { return SqMember::template GetProxy(); } // Member Function Resolver -template SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A...) const) noexcept { +template SQFUNCTION SqMemberFunc(R (C::* /*method*/)(A...) const) { return SqMember::template GetProxyC(); } // Member Function Resolver -template SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A...)) noexcept { +template SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A...)) { return SqMember::template GetProxy(); } // Member Function Resolver -template SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A...) const) noexcept { +template SQFUNCTION SqMemberFunc(R& (C::* /*method*/)(A...) const) { return SqMember::template GetProxyC(); } diff --git a/include/sqrat/sqratOverloadMethods.h b/include/sqrat/sqratOverloadMethods.h index 7809a869..9058c844 100644 --- a/include/sqrat/sqratOverloadMethods.h +++ b/include/sqrat/sqratOverloadMethods.h @@ -152,42 +152,42 @@ public: }; // Global Overloaded Function Resolver -template SQFUNCTION SqGlobalOverloadedFunc(R (* /*method*/)(A...)) noexcept { +template SQFUNCTION SqGlobalOverloadedFunc(R (* /*method*/)(A...)) { return SqGlobal::template GetProxy<2, true, A...>(); } // Global Overloaded Function Resolver -template SQFUNCTION SqGlobalOverloadedFunc(R& (* /*method*/)(A...)) noexcept { +template SQFUNCTION SqGlobalOverloadedFunc(R& (* /*method*/)(A...)) { return SqGlobal::template GetProxy<2, true, A...>(); } // Member Global Overloaded Function Resolver -template SQFUNCTION SqMemberGlobalOverloadedFunc(R (* /*method*/)(T, A...)) noexcept { +template SQFUNCTION SqMemberGlobalOverloadedFunc(R (* /*method*/)(T, A...)) { return SqGlobal::template GetProxy<1, true, T, A...>(); } // Member Global Overloaded Function Resolver -template SQFUNCTION SqMemberGlobalOverloadedFunc(R& (* /*method*/)(T, A...)) noexcept { +template SQFUNCTION SqMemberGlobalOverloadedFunc(R& (* /*method*/)(T, A...)) { return SqGlobal::template GetProxy<1, true, T, A...>(); } // Member Overloaded Function Resolver -template SQFUNCTION SqMemberOverloadedFunc(R (C::* /*method*/)(A...)) noexcept { +template SQFUNCTION SqMemberOverloadedFunc(R (C::* /*method*/)(A...)) { return SqMember::template GetProxy(); } // Member Overloaded Function Resolver -template SQFUNCTION SqMemberOverloadedFunc(R (C::* /*method*/)(A...) const) noexcept { +template SQFUNCTION SqMemberOverloadedFunc(R (C::* /*method*/)(A...) const) { return SqMember::template GetProxyC(); } // Member Overloaded Function Resolver -template SQFUNCTION SqMemberOverloadedFunc(R& (C::* /*method*/)(A...)) noexcept { +template SQFUNCTION SqMemberOverloadedFunc(R& (C::* /*method*/)(A...)) { return SqMember::template GetProxy(); } // Member Overloaded Function Resolver -template SQFUNCTION SqMemberOverloadedFunc(R& (C::* /*method*/)(A...) const) noexcept { +template SQFUNCTION SqMemberOverloadedFunc(R& (C::* /*method*/)(A...) const) { return SqMember::template GetProxyC(); } diff --git a/include/sqrat/sqratTypes.h b/include/sqrat/sqratTypes.h index 9d6db694..643e3c47 100644 --- a/include/sqrat/sqratTypes.h +++ b/include/sqrat/sqratTypes.h @@ -1187,12 +1187,12 @@ template<> struct ArgFwdHasFmt { static constexpr bool value = /// Helper used to process formatted arguments when necessary. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template struct ArgFwdFmt { - template static inline SQInteger Proc(T &, bool) noexcept { return SQ_OK; } - template static inline SQInteger Get(T &) noexcept { return SQ_OK; } + template static inline SQInteger Proc(T &, bool) { return SQ_OK; } + template static inline SQInteger Get(T &) { return SQ_OK; } }; template<> struct ArgFwdFmt { - static inline SQInteger Proc(StackStrF & s, bool dummy = false) noexcept { return s.Proc(true, dummy); } - static inline SQInteger Get(StackStrF & s) noexcept { return s.mRes; } + static inline SQInteger Proc(StackStrF & s, bool dummy = false) { return s.Proc(true, dummy); } + static inline SQInteger Get(StackStrF & s) { return s.mRes; } }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/sqrat/sqratUtil.h b/include/sqrat/sqratUtil.h index ab1a9459..aabcac57 100644 --- a/include/sqrat/sqratUtil.h +++ b/include/sqrat/sqratUtil.h @@ -205,17 +205,17 @@ class WeakPtr; // Helper class that defines a VM that can be used as a fallback VM in case no other one is given to a piece of code class DefaultVM { private: - static HSQUIRRELVM& StaticVM() noexcept { + static HSQUIRRELVM& StaticVM() { static HSQUIRRELVM vm; return vm; } public: // Gets the default VM (copy) - static HSQUIRRELVM Get() noexcept { + static HSQUIRRELVM Get() { return StaticVM(); } // Gets the default VM (reference) - static HSQUIRRELVM & Get_() noexcept { + static HSQUIRRELVM & Get_() { return StaticVM(); } // Sets the default VM to a given VM @@ -400,7 +400,7 @@ public: /// \param msg A nice error message /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - Exception(const SQChar * msg) noexcept : message(msg) {} + Exception(const SQChar * msg) : message(msg) {} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Constructs an exception @@ -408,7 +408,7 @@ public: /// \param msg A nice error message /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - explicit Exception(string && msg) noexcept : message(msg) {} + explicit Exception(string && msg) : message(msg) {} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Constructs an exception @@ -416,7 +416,7 @@ public: /// \param msg A nice error message /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - explicit Exception(const string& msg) noexcept : message(msg) {} + explicit Exception(const string& msg) : message(msg) {} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Copy constructor @@ -424,7 +424,7 @@ public: /// \param ex Exception to copy /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - Exception(const Exception& ex) noexcept : message(ex.message) {} + Exception(const Exception& ex) : message(ex.message) {} ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Returns a string identifying the exception @@ -432,7 +432,7 @@ public: /// \return A nice error message /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - const string& Message() const noexcept { + const string& Message() const { return message; } @@ -442,7 +442,7 @@ public: /// \return A nice error message /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - const SQChar * what() const noexcept { + const SQChar * what() const { return message.c_str(); } @@ -575,7 +575,7 @@ private: /// Assigns a new pointer. /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void Assign(T * ptr) noexcept + void Assign(T * ptr) { if (m_Ptr != ptr) { @@ -593,7 +593,7 @@ private: /// Assigns a new pointer and counter. /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void Assign(T * ptr, Counter * ref) noexcept + void Assign(T * ptr, Counter * ref) { if (m_Ptr != ptr) { @@ -1098,7 +1098,7 @@ private: /// Initializes the pointer and counter. /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void Initialize(T * ptr, Counter * ref) noexcept + void Initialize(T * ptr, Counter * ref) { if (ptr != NULL) { @@ -1118,7 +1118,7 @@ private: /// Assigns a new pointer and counter. /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - void Assign(T * ptr, Counter * ref) noexcept + void Assign(T * ptr, Counter * ref) { if (m_Ptr != ptr) { @@ -1551,7 +1551,7 @@ struct StackStrF ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Default constructor. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - StackStrF() noexcept + StackStrF() : mPtr(_SC("")) , mLen(0) , mRes(SQ_OK) @@ -1565,7 +1565,7 @@ struct StackStrF ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Compile time string constructor. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - template < size_t N > StackStrF(const SQChar(&str)[N]) noexcept + template < size_t N > StackStrF(const SQChar(&str)[N]) : mPtr(str) , mLen(N) , mRes(SQ_OK) @@ -1579,7 +1579,7 @@ struct StackStrF ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Base constructor. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - StackStrF(HSQUIRRELVM vm, SQInteger idx) noexcept + StackStrF(HSQUIRRELVM vm, SQInteger idx) : mPtr(nullptr) , mLen(SQ_ERROR) , mRes(SQ_OK) @@ -1597,7 +1597,7 @@ struct StackStrF ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Move constructor. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - StackStrF(StackStrF && o) noexcept + StackStrF(StackStrF && o) : mPtr(o.mPtr) , mLen(o.mLen) , mRes(o.mRes) @@ -1616,7 +1616,7 @@ struct StackStrF ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Destructor. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - ~StackStrF() noexcept + ~StackStrF() { if (mVM && !sq_isnull(mObj)) { @@ -1637,7 +1637,7 @@ struct StackStrF ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// Actual implementation. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - SQRESULT Proc(bool fmt = false, bool dummy = false) noexcept + SQRESULT Proc(bool fmt = false, bool dummy = false) { // Reset the converted value object sq_resetobject(&mObj);