mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
cleanup
This commit is contained in:
parent
02447f0996
commit
f776e73b04
11 changed files with 50 additions and 54 deletions
|
|
@ -633,6 +633,10 @@ void ExprEvalState::pushFrame(StringTableEntry frameName, Namespace *ns, S32 reg
|
|||
|
||||
AssertFatal(!newFrame.getCount(), "ExprEvalState::pushFrame - Dictionary not empty!");
|
||||
|
||||
ConsoleValue* consoleValArray = new ConsoleValue[registerCount];
|
||||
localStack.push_back(ConsoleValueFrame(consoleValArray, false));
|
||||
currentRegisterArray = &localStack.last();
|
||||
|
||||
#ifdef DEBUG_SPEW
|
||||
validate();
|
||||
#endif
|
||||
|
|
@ -653,6 +657,13 @@ void ExprEvalState::popFrame()
|
|||
stack[mStackDepth]->reset();
|
||||
currentVariable = NULL;
|
||||
|
||||
const ConsoleValueFrame& frame = localStack.last();
|
||||
localStack.pop_back();
|
||||
if (!frame.isReference)
|
||||
delete[] frame.values;
|
||||
|
||||
currentRegisterArray = localStack.size() ? &localStack.last() : NULL;
|
||||
|
||||
#ifdef DEBUG_SPEW
|
||||
validate();
|
||||
#endif
|
||||
|
|
@ -1296,7 +1307,7 @@ ConsoleValue Namespace::Entry::execute(S32 argc, ConsoleValue *argv, ExprEvalSta
|
|||
case StringCallbackType:
|
||||
{
|
||||
const char* str = cb.mStringCallbackFunc(state->thisObject, argc, argv);
|
||||
result.setString(str, dStrlen(str));
|
||||
result.setString(str);
|
||||
break;
|
||||
}
|
||||
case IntCallbackType:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue