Fixed bad string compares and simdictionary

This commit is contained in:
Vincent Gee 2014-11-04 19:51:13 -05:00
parent acb192e2a5
commit 9907c4592e
30 changed files with 169 additions and 202 deletions

View file

@ -507,7 +507,7 @@ DefineConsoleMethod( EventManager, dumpSubscribers, void, ( const char * listene
"Print all subscribers to an event to the console.\n"
"@param event The event whose subscribers are to be printed. If this parameter isn't specified, all events will be dumped." )
{
if( listenerName != "" )
if (dStrcmp(listenerName, "") != 0)
object->dumpSubscribers( listenerName );
else
object->dumpSubscribers();

View file

@ -648,7 +648,7 @@ DefineConsoleMethod(Settings, setValue, void, (const char * settingName, const c
{
const char *fieldName = StringTable->insert( settingName );
if( value != "")
if (dStrcmp(value, "") != 0)
object->setValue( fieldName, value );
else
object->setValue( fieldName );
@ -664,9 +664,9 @@ DefineConsoleMethod(Settings, value, const char*, (const char * settingName, con
{
const char *fieldName = StringTable->insert( settingName );
if(defaultValue != "")
if (dStrcmp(defaultValue, "") != 0)
return object->value( fieldName, defaultValue );
else if(settingName != "")
else if (dStrcmp(settingName, "") != 0)
return object->value( fieldName );
return "";

View file

@ -504,7 +504,7 @@ void UndoManager::popCompound( bool discard )
DefineConsoleMethod(UndoAction, addToManager, void, (const char * undoManager), (""), "action.addToManager([undoManager])")
{
UndoManager *theMan = NULL;
if(undoManager != "")
if (dStrcmp(undoManager, "") != 0)
{
SimObject *obj = Sim::findObject(undoManager);
if(obj)
@ -582,7 +582,7 @@ DefineConsoleMethod( UndoManager, popCompound, void, ( bool discard ), (false),
{
if( !object->getCompoundStackDepth() )
{
Con::errorf( "UndoManager::popCompound - no compound on stack" );
Con::errorf( "UndoManager::popCompound - no compound on stack (%s) ",object->getName() );
return;
}