MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / pushValue

Method pushValue

Engine/source/console/stringStack.cpp:80–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void ConsoleValueStack::pushValue(ConsoleValue &variable)
81{
82 if (mStackPos == ConsoleValueStack::MaxStackDepth) {
83 AssertFatal(false, "Console Value Stack is empty");
84 return;
85 }
86
87 switch (variable.type)
88 {
89 case ConsoleValue::TypeInternalInt:
90 mStack[mStackPos++].setIntValue((S32)variable.getIntValue());
91 case ConsoleValue::TypeInternalFloat:
92 mStack[mStackPos++].setFloatValue((F32)variable.getFloatValue());
93 case ConsoleValue::TypeInternalStringStackPtr:
94 mStack[mStackPos++].setStringStackPtrValue(variable.getStringStackPtr());
95 default:
96 mStack[mStackPos++].setStringValue(variable.getStringValue());
97 }
98}
99
100ConsoleValue* ConsoleValueStack::reserveValues(U32 count)
101{

Callers 1

execMethod · 0.80

Calls 8

getStringStackPtrMethod · 0.80
setIntValueMethod · 0.45
getIntValueMethod · 0.45
setFloatValueMethod · 0.45
getFloatValueMethod · 0.45
setStringValueMethod · 0.45
getStringValueMethod · 0.45

Tested by

no test coverage detected