mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-08 02:48:34 +00:00
Move destructor to "Nuke".
This commit is contained in:
parent
86916f2b0d
commit
0cd1258b6c
@ -110,18 +110,24 @@ public:
|
|||||||
|
|
||||||
~AutoHandleIdentLocker()
|
~AutoHandleIdentLocker()
|
||||||
{
|
{
|
||||||
if (this->pSecurity)
|
this->Nuke();
|
||||||
this->pSecurity->access[HandleAccess_Delete] &= ~HANDLE_RESTRICT_IDENTEXCLUSIVE;
|
|
||||||
|
|
||||||
this->pSecurity = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AutoHandleIdentLocker &operator =(const AutoHandleIdentLocker &other)
|
AutoHandleIdentLocker &operator =(const AutoHandleIdentLocker &other)
|
||||||
{
|
{
|
||||||
~AutoHandleIdentLocker();
|
this->Nuke();
|
||||||
this->pSecurity = other.pSecurity;
|
this->pSecurity = other.pSecurity;
|
||||||
}
|
}
|
||||||
|
private:
|
||||||
|
void Nuke(void)
|
||||||
|
{
|
||||||
|
if (this->pSecurity)
|
||||||
|
{
|
||||||
|
this->pSecurity->access[HandleAccess_Delete] &= ~HANDLE_RESTRICT_IDENTEXCLUSIVE;
|
||||||
|
this->pSecurity = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
HandleAccess *pSecurity;
|
HandleAccess *pSecurity;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user