* BugFix: Clear a lot of warnings and correct a few actual programming errors along the way.

This commit is contained in:
Robert MacGregor 2021-10-04 20:04:21 -04:00
parent ef514d0e6b
commit 1b6b803a20
61 changed files with 120 additions and 118 deletions

View file

@ -2438,7 +2438,7 @@ DefineEngineMethod( GuiCanvas, getMouseControl, S32, (),,
if (control)
return control->getId();
return NULL;
return 0;
}
DefineEngineFunction(excludeOtherInstance, bool, (const char* appIdentifer),,

View file

@ -908,12 +908,12 @@ DefineEngineMethod( GuiInspector, findByObject, S32, (SimObject* obj), ,
"@return id of an awake inspector that is inspecting the passed object if one exists, else NULL or 0.")
{
if ( !obj)
return NULL;
return 0;
SimObject *inspector = GuiInspector::findByObject(obj);
if ( !inspector )
return NULL;
return 0;
return inspector->getId();
}

View file

@ -160,11 +160,11 @@ void GuiShapeEdPreview::initPersistFields()
addGroup( "Animation" );
addField( "activeThread", TypeS32, Offset( mActiveThread, GuiShapeEdPreview ),
"Index of the active thread, or -1 if none" );
addProtectedField( "threadPos", TypeF32, NULL, &setFieldThreadPos, &getFieldThreadPos,
addProtectedField( "threadPos", TypeF32, 0, &setFieldThreadPos, &getFieldThreadPos,
"Current position of the active thread (0-1)" );
addProtectedField( "threadDirection", TypeS32, NULL, &setFieldThreadDir, &getFieldThreadDir,
addProtectedField( "threadDirection", TypeS32, 0, &setFieldThreadDir, &getFieldThreadDir,
"Playback direction of the active thread" );
addProtectedField( "threadPingPong", TypeBool, NULL, &setFieldThreadPingPong, &getFieldThreadPingPong,
addProtectedField( "threadPingPong", TypeBool, 0, &setFieldThreadPingPong, &getFieldThreadPingPong,
"'PingPong' mode of the active thread" );
endGroup( "Animation" );

View file

@ -248,7 +248,7 @@ class GuiConvexEditorUndoAction : public UndoAction
friend class GuiConvexEditorCtrl;
public:
GuiConvexEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mEditor(NULL), mObjId(NULL)
GuiConvexEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mEditor(NULL), mObjId(0)
{
}

View file

@ -145,7 +145,7 @@ class GuiMissionAreaUndoAction : public UndoAction
{
public:
GuiMissionAreaUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mMissionAreaEditor(NULL), mObjId(NULL)
GuiMissionAreaUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mMissionAreaEditor(NULL), mObjId(0)
{
}

View file

@ -773,7 +773,7 @@ ConsoleDocClass( TerrainSmoothAction,
);
TerrainSmoothAction::TerrainSmoothAction()
: UndoAction("Terrain Smoothing"), mFactor(1.0), mSteps(1), mTerrainId(NULL)
: UndoAction("Terrain Smoothing"), mFactor(1.0), mSteps(1), mTerrainId(0)
{
}