mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-01 06:27:11 +02:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user