diff --git a/src/3rdparty/squirrel/squirrel/sqobject.h b/src/3rdparty/squirrel/squirrel/sqobject.h index d0d0599f6e..3b3c516067 100644 --- a/src/3rdparty/squirrel/squirrel/sqobject.h +++ b/src/3rdparty/squirrel/squirrel/sqobject.h @@ -161,6 +161,14 @@ struct SQObjectPtr : public SQObject _unVal=o._unVal; __AddRef(_type,_unVal); } + SQObjectPtr(SQObjectPtr &&o) + { + SQ_OBJECT_RAWINIT() + this->_type = OT_NULL; + this->_unVal.pUserPointer = nullptr; + std::swap(this->_type, o._type); + std::swap(this->_unVal, o._unVal); + } SQObjectPtr(const SQObject &o) { SQ_OBJECT_RAWINIT() @@ -330,6 +338,12 @@ struct SQObjectPtr : public SQObject __Release(tOldType,unOldVal); return *this; } + inline SQObjectPtr& operator=(SQObjectPtr &&obj) + { + std::swap(this->_type, obj._type); + std::swap(this->_unVal, obj._unVal); + return *this; + } inline SQObjectPtr& operator=(const SQObject& obj) { SQObjectType tOldType;