mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-23 05:00:27 +02:00
Reordered NotifyDelete switch statement for more clarity
This commit is contained in:
1 file changed
+10
-4
@@ -1807,10 +1807,6 @@ void ScriptVM::NotifyDelete(void)
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
case STATE_DESTROYED:
|
||||
ScriptError("Attempting to delete a dead thread.");
|
||||
break;
|
||||
|
||||
case STATE_RUNNING:
|
||||
case STATE_SUSPENDED:
|
||||
case STATE_WAITING:
|
||||
@@ -1832,6 +1828,16 @@ void ScriptVM::NotifyDelete(void)
|
||||
delete this;
|
||||
|
||||
break;
|
||||
|
||||
case STATE_DESTROYED:
|
||||
ScriptError("Attempting to delete a dead thread.");
|
||||
|
||||
state = STATE_DESTROYED;
|
||||
|
||||
if (m_ScriptClass) {
|
||||
m_ScriptClass->RemoveThread(this);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user