1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Implement move constructor in StackStrF type.

This commit is contained in:
Sandu Liviu Catalin 2016-11-14 10:25:31 +02:00
parent da76d87a93
commit ded30fdeac

View File

@ -1520,9 +1520,21 @@ struct StackStrF
StackStrF(const StackStrF & o) = delete; StackStrF(const StackStrF & o) = delete;
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------
* Copy constructor. (disabled) * Copy constructor.
*/ */
StackStrF(StackStrF && o) = delete; StackStrF(StackStrF && o)
: mPtr(o.mPtr)
, mLen(o.mLen)
, mRes(o.mRes)
, mObj(o.mObj)
, mVM(o.mVM)
{
o.mPtr = nullptr;
o.mLen = 0;
o.mRes = SQ_OK;
o.mVM = nullptr;
sq_resetobject(&o.mObj);
}
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------
* Destructor. * Destructor.