mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Remove value constructors for ConsoleValueRef & fix callbacks which use them. Fixes issue #1289
This commit is contained in:
parent
eb0351139e
commit
12d435c341
5 changed files with 17 additions and 43 deletions
|
|
@ -1534,9 +1534,16 @@ StringTableEntry getModNameFromPath(const char *path)
|
|||
void postConsoleInput( RawData data )
|
||||
{
|
||||
// Schedule this to happen at the next time event.
|
||||
ConsoleValue values[2];
|
||||
ConsoleValueRef argv[2];
|
||||
argv[0] = "eval";
|
||||
argv[1] = ( const char* ) data.data;
|
||||
|
||||
values[0].init();
|
||||
values[0].setStringValue("eval");
|
||||
values[1].init();
|
||||
values[1].setStringValue((const char*)data.data);
|
||||
argv[0].value = &values[0];
|
||||
argv[1].value = &values[1];
|
||||
|
||||
Sim::postCurrentEvent(Sim::getRootGroup(), new SimConsoleEvent(2, argv, false));
|
||||
}
|
||||
|
||||
|
|
@ -1610,36 +1617,6 @@ ConsoleValueRef::ConsoleValueRef(const ConsoleValueRef &ref)
|
|||
value = ref.value;
|
||||
}
|
||||
|
||||
ConsoleValueRef::ConsoleValueRef(const char *newValue) : value(NULL)
|
||||
{
|
||||
*this = newValue;
|
||||
}
|
||||
|
||||
ConsoleValueRef::ConsoleValueRef(const String &newValue) : value(NULL)
|
||||
{
|
||||
*this = (const char*)(newValue.utf8());
|
||||
}
|
||||
|
||||
ConsoleValueRef::ConsoleValueRef(U32 newValue) : value(NULL)
|
||||
{
|
||||
*this = newValue;
|
||||
}
|
||||
|
||||
ConsoleValueRef::ConsoleValueRef(S32 newValue) : value(NULL)
|
||||
{
|
||||
*this = newValue;
|
||||
}
|
||||
|
||||
ConsoleValueRef::ConsoleValueRef(F32 newValue) : value(NULL)
|
||||
{
|
||||
*this = newValue;
|
||||
}
|
||||
|
||||
ConsoleValueRef::ConsoleValueRef(F64 newValue) : value(NULL)
|
||||
{
|
||||
*this = newValue;
|
||||
}
|
||||
|
||||
ConsoleValueRef& ConsoleValueRef::operator=(const ConsoleValueRef &newValue)
|
||||
{
|
||||
value = newValue.value;
|
||||
|
|
|
|||
|
|
@ -214,12 +214,6 @@ public:
|
|||
~ConsoleValueRef() { ; }
|
||||
|
||||
ConsoleValueRef(const ConsoleValueRef &ref);
|
||||
ConsoleValueRef(const char *value);
|
||||
ConsoleValueRef(const String &ref);
|
||||
ConsoleValueRef(U32 value);
|
||||
ConsoleValueRef(S32 value);
|
||||
ConsoleValueRef(F32 value);
|
||||
ConsoleValueRef(F64 value);
|
||||
|
||||
static ConsoleValueRef fromValue(ConsoleValue *value) { ConsoleValueRef ref; ref.value = value; return ref; }
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ ConsoleValueRef SimConsoleThreadExecCallback::waitForResult()
|
|||
return retVal;
|
||||
}
|
||||
|
||||
return (const char*)NULL;
|
||||
return ConsoleValueRef();
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue