mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Revert "Update console.h"
This reverts commit f10080489995570036e2e5ba762357559a0abd34.
This commit is contained in:
parent
2b14e5448e
commit
0df6e99a75
|
|
@ -154,18 +154,37 @@ class ConsoleValue
|
|||
|
||||
TORQUE_FORCEINLINE bool hasAllocatedData() const
|
||||
{
|
||||
return (type == ConsoleValueType::cvString || isConsoleType()) && data != NULL;
|
||||
return (isConsoleType() && data != NULL);
|
||||
}
|
||||
|
||||
const char* getConsoleData() const;
|
||||
|
||||
TORQUE_FORCEINLINE void cleanupData()
|
||||
{
|
||||
if (hasAllocatedData())
|
||||
switch (type)
|
||||
{
|
||||
case ConsoleValueType::cvConsoleValueType:
|
||||
if (ct)
|
||||
{
|
||||
delete ct;
|
||||
ct = nullptr;
|
||||
}
|
||||
break;
|
||||
case ConsoleValueType::cvString:
|
||||
if (s && s != StringTable->EmptyString())
|
||||
dFree(s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (data != NULL)
|
||||
{
|
||||
dFree(data);
|
||||
data = NULL;
|
||||
}
|
||||
|
||||
type = ConsoleValueType::cvNULL;
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in a new issue