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

Method getBoolValue

Engine/source/console/console.cpp:2640–2652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2638}
2639
2640bool ConsoleValue::getBoolValue()
2641{
2642 if(type == TypeInternalString || type == TypeInternalStackString || type == TypeInternalStringStackPtr)
2643 return dAtob(getStringValue());
2644 if(type == TypeInternalFloat)
2645 return fval > 0;
2646 else if(type == TypeInternalInt)
2647 return ival > 0;
2648 else {
2649 const char *value = Con::getData(type, dataPtr, 0, enumTable);
2650 return dAtob(value);
2651 }
2652}
2653
2654void ConsoleValue::setIntValue(S32 val)
2655{

Callers 1

TESTFunction · 0.45

Calls 2

getDataFunction · 0.85
dAtobFunction · 0.70

Tested by 1

TESTFunction · 0.36