mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Reverse the order of the VM and stack top in stack guard.
This commit is contained in:
parent
570b938d7c
commit
dfacd2c86c
@ -34,7 +34,7 @@ struct StackGuard
|
||||
* Default constructor.
|
||||
*/
|
||||
StackGuard()
|
||||
: m_Top(sq_gettop(DefaultVM::Get())), m_VM(DefaultVM::Get())
|
||||
: m_VM(DefaultVM::Get()), m_Top(sq_gettop(m_VM))
|
||||
{
|
||||
/* ... */
|
||||
}
|
||||
@ -43,7 +43,7 @@ struct StackGuard
|
||||
* Base constructor.
|
||||
*/
|
||||
StackGuard(HSQUIRRELVM vm)
|
||||
: m_Top(sq_gettop(vm)), m_VM(vm)
|
||||
: m_VM(vm), m_Top(sq_gettop(vm))
|
||||
{
|
||||
/* ... */
|
||||
}
|
||||
@ -79,8 +79,8 @@ struct StackGuard
|
||||
private:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
Int32 m_Top; /* The top of the stack when this instance was created. */
|
||||
HSQUIRRELVM m_VM; /* The VM where the stack should be restored. */
|
||||
HSQUIRRELVM m_VM; // The VM where the stack should be restored.
|
||||
Int32 m_Top; // The top of the stack when this instance was created.
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user