mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Fixes after feedback from Luis.
* Made use of dStrIsEmpty in more locations (and fixed it :P) * Removed commented-out code * Corrected default params * Fixed some console warning formats * Removed tabs * Corrected setExtent API
This commit is contained in:
parent
04ff04a95f
commit
3ab048c5b0
30 changed files with 130 additions and 110 deletions
|
|
@ -646,9 +646,9 @@ void SettingSaveNode::buildDocument(SimXMLDocument *document, bool skipWrite)
|
|||
|
||||
DefineConsoleMethod(Settings, setValue, void, (const char * settingName, const char * value), (""), "settingObj.setValue(settingName, value);")
|
||||
{
|
||||
const char *fieldName = StringTable->insert( settingName );
|
||||
StringTableEntry fieldName = StringTable->insert( settingName );
|
||||
|
||||
if (dStrcmp(value, "") != 0)
|
||||
if (!dStrIsEmpty(value))
|
||||
object->setValue( fieldName, value );
|
||||
else
|
||||
object->setValue( fieldName );
|
||||
|
|
@ -656,13 +656,13 @@ DefineConsoleMethod(Settings, setValue, void, (const char * settingName, const c
|
|||
|
||||
DefineConsoleMethod(Settings, setDefaultValue, void, (const char * settingName, const char * value), , "settingObj.setDefaultValue(settingName, value);")
|
||||
{
|
||||
const char *fieldName = StringTable->insert( settingName );
|
||||
StringTableEntry fieldName = StringTable->insert( settingName );
|
||||
object->setDefaultValue( fieldName, value );
|
||||
}
|
||||
|
||||
DefineConsoleMethod(Settings, value, const char*, (const char * settingName, const char * defaultValue), (""), "settingObj.value(settingName, defaultValue);")
|
||||
{
|
||||
const char *fieldName = StringTable->insert( settingName );
|
||||
StringTableEntry fieldName = StringTable->insert( settingName );
|
||||
|
||||
if (dStrcmp(defaultValue, "") != 0)
|
||||
return object->value( fieldName, defaultValue );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue