rest of virtuals removed

virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
This commit is contained in:
marauder2k7 2024-03-18 18:40:22 +00:00
parent efbe5e90f5
commit 2b295fb7f0
454 changed files with 4162 additions and 4156 deletions

View file

@ -75,9 +75,9 @@ class DbgFileView : public GuiArrayCtrl
DECLARE_CONOBJECT(DbgFileView);
DECLARE_CATEGORY( "Gui Editor" );
bool onWake();
bool onWake() override;
void clear();
void clear() override;
void clearBreakPositions();
void setCurrentLine(S32 lineNumber, bool setCurrentLine);
@ -90,12 +90,12 @@ class DbgFileView : public GuiArrayCtrl
bool findString(const char *text);
void onMouseDown(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onPreRender();
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
void onPreRender() override;
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) override;
};
#endif //_GUI_DEBUGGER_H

View file

@ -49,10 +49,10 @@ class GuiEaseViewCtrl : public GuiControl
GuiEaseViewCtrl();
bool onWake();
void onSleep();
bool onWake() override;
void onSleep() override;
void onRender( Point2I, const RectI &);
void onRender( Point2I, const RectI &) override;
static void initPersistFields();
DECLARE_CONOBJECT( GuiEaseViewCtrl );

View file

@ -2834,7 +2834,7 @@ class GuiEditorRuler : public GuiControl
return ORIENTATION_Vertical;
}
bool onWake()
bool onWake() override
{
if( !Parent::onWake() )
return false;
@ -2848,12 +2848,12 @@ class GuiEditorRuler : public GuiControl
return true;
}
void onPreRender()
void onPreRender() override
{
setUpdate();
}
void onMouseDown( const GuiEvent& event )
void onMouseDown( const GuiEvent& event ) override
{
if( !mEditCtrl )
return;
@ -2872,7 +2872,7 @@ class GuiEditorRuler : public GuiControl
mEditCtrl->startMouseGuideDrag( axis, guideIndex );
}
void onRender(Point2I offset, const RectI &updateRect)
void onRender(Point2I offset, const RectI &updateRect) override
{
GFX->getDrawUtil()->drawRectFill(updateRect, ColorI::DARK);

View file

@ -246,8 +246,8 @@ class GuiEditCtrl : public GuiControl
DECLARE_CATEGORY( "Gui Editor" );
DECLARE_DESCRIPTION( "Implements the framework for the GUI editor." );
bool onWake();
void onSleep();
bool onWake() override;
void onSleep() override;
static void initPersistFields();
@ -258,8 +258,8 @@ class GuiEditCtrl : public GuiControl
void getDragRect(RectI &b);
void drawNut(const Point2I &nut, ColorI &outlineColor, ColorI &nutColor);
void drawNuts(RectI &box, ColorI &outlineColor, ColorI &nutColor);
void onPreRender();
void onRender(Point2I offset, const RectI &updateRect);
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
void addNewControl(GuiControl *ctrl);
void setCurrentAddSet(GuiControl *ctrl, bool clearSelection = true);
GuiControl* getCurrentAddSet();
@ -314,7 +314,7 @@ class GuiEditCtrl : public GuiControl
void controlInspectPostApply(GuiControl* object);
// Sizing Cursors
void getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent);
void getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent) override;
U32 getSelectionSize() const { return mSelectedControls.size(); }
const Vector<GuiControl *>& getSelected() const { return mSelectedControls; }
@ -322,16 +322,16 @@ class GuiEditCtrl : public GuiControl
SimGroup* getTrash() { return mTrash; }
GuiControl* getAddSet() const { return mCurrentAddSet; }; //JDD
bool onKeyDown(const GuiEvent &event);
void onMouseDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onRightMouseDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onRightMouseDown(const GuiEvent &event) override;
mouseModes getMouseMode() const { return mMouseDownMode; }
virtual bool onAdd();
virtual void onRemove();
bool onAdd() override;
void onRemove() override;
void setSnapToGrid(U32 gridsize);
};

View file

@ -66,11 +66,11 @@ public:
static void initPersistFields();
//Parental methods
bool onWake();
bool onWake() override;
void onMouseDown(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onMouseUp(const GuiEvent &);
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &) override;
F32 getValue(S32 n);
const Filter* get() { return &mFilter; }
@ -78,8 +78,8 @@ public:
S32 getNumControlPoints() {return mFilter.size(); }
void identity();
void onPreRender();
void onRender(Point2I offset, const RectI &updateRect );
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect ) override;
};

View file

@ -73,7 +73,7 @@ class GuiGraphCtrl : public GuiControl
void setMax( S32 plotID, F32 max ) { mGraphMax[ plotID ] = max; }
// GuiControl.
virtual void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
DECLARE_CONOBJECT(GuiGraphCtrl);
DECLARE_CATEGORY( "Gui Other" );

View file

@ -81,33 +81,33 @@ public:
GuiMenuBar();
void onRemove();
bool onWake();
void onSleep();
void onRemove() override;
bool onWake() override;
void onSleep() override;
virtual void addObject(SimObject* object);
void addObject(SimObject* object) override;
MenuEntry *findHitMenu(Point2I mousePoint);
void onPreRender();
void onRender(Point2I offset, const RectI &updateRect);
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
void checkMenuMouseMove(const GuiEvent &event);
void onMouseMove(const GuiEvent &event);
void onMouseEnter(const GuiEvent &event);
void onMouseLeave(const GuiEvent &event);
void onMouseDown(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseMove(const GuiEvent &event) override;
void onMouseEnter(const GuiEvent &event) override;
void onMouseLeave(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onAction();
void onAction() override;
void closeMenu();
void buildWindowAcceleratorMap( WindowInputGenerator &inputGenerator );
void removeWindowAcceleratorMap( WindowInputGenerator &inputGenerator );
void acceleratorKeyPress(U32 index);
void acceleratorKeyPress(U32 index) override;
// Added to support 'ticks'
void processTick();
void processTick() override;
void insert(SimObject* pObject, S32 pos);
void remove(SimObject* pObject);

View file

@ -99,18 +99,18 @@ public:
GuiParticleGraphCtrl();
virtual ~GuiParticleGraphCtrl() { };
void onMouseMove(const GuiEvent &event);
void onMouseDown( const GuiEvent &event );
void onMouseUp( const GuiEvent &event );
void onMouseDragged( const GuiEvent &event );
void onRightMouseDown( const GuiEvent &event );
void onRightMouseUp( const GuiEvent &event );
void onRightMouseDragged( const GuiEvent &event );
void onMouseMove(const GuiEvent &event) override;
void onMouseDown( const GuiEvent &event ) override;
void onMouseUp( const GuiEvent &event ) override;
void onMouseDragged( const GuiEvent &event ) override;
void onRightMouseDown( const GuiEvent &event ) override;
void onRightMouseUp( const GuiEvent &event ) override;
void onRightMouseDragged( const GuiEvent &event ) override;
//Parental methods
bool onWake();
bool onWake() override;
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
bool renderGraphTooltip(Point2I cursorPos, StringTableEntry tooltip);
// Graph interface

View file

@ -61,12 +61,12 @@ public:
GuiPopupMenuTextListCtrl();
// GuiControl overloads:
bool onKeyDown(const GuiEvent &event);
void onMouseDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
bool onKeyDown(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) override;
virtual void onCellHighlighted(Point2I cell); // Added
void onCellHighlighted(Point2I cell) override; // Added
};
class GuiPopupMenuBackgroundCtrl : public GuiControl
@ -75,10 +75,10 @@ class GuiPopupMenuBackgroundCtrl : public GuiControl
public:
GuiPopupMenuBackgroundCtrl();
void onMouseDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseMove(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onMouseDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onMouseMove(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void close();

View file

@ -49,11 +49,11 @@ public:
static void initPersistFields();
virtual void onMouseUp(const GuiEvent &event);
virtual void onMouseDown(const GuiEvent &event);
virtual void onMouseDragged(const GuiEvent &event);
void onMouseUp(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
virtual void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
};
#endif

View file

@ -58,7 +58,7 @@ public:
static void initPersistFields();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
};
typedef GuiSeparatorCtrl::separatorTypeOptions GuiSeparatorType;

View file

@ -163,7 +163,7 @@ protected:
void updateThreads(F32 delta);
// Rendering
void renderGrid();
void renderGrid() override;
void renderNodes() const;
void renderNodeAxes(S32 index, const LinearColorF& nodeColor) const;
void renderNodeName(S32 index, const LinearColorF& textColor) const;
@ -171,27 +171,27 @@ protected:
void renderCollisionMeshes() const;
public:
bool onWake();
bool onWake() override;
void setDisplayType(S32 type);
void setDisplayType(S32 type) override;
/// @name Mouse event handlers
///@{
void onMouseDown(const GuiEvent& event) { handleMouseDown(event, NoneMode); }
void onMouseUp(const GuiEvent& event) { handleMouseUp(event, NoneMode); }
void onMouseMove(const GuiEvent& event) { handleMouseMove(event, NoneMode); }
void onMouseDragged(const GuiEvent& event) { handleMouseDragged(event, NoneMode); }
void onMouseDown(const GuiEvent& event) override { handleMouseDown(event, NoneMode); }
void onMouseUp(const GuiEvent& event) override { handleMouseUp(event, NoneMode); }
void onMouseMove(const GuiEvent& event) override { handleMouseMove(event, NoneMode); }
void onMouseDragged(const GuiEvent& event) override { handleMouseDragged(event, NoneMode); }
void onMiddleMouseDown(const GuiEvent& event) { handleMouseDown(event, MoveMode); }
void onMiddleMouseUp(const GuiEvent& event) { handleMouseUp(event, MoveMode); }
void onMiddleMouseDragged(const GuiEvent& event) { handleMouseDragged(event, MoveMode); }
void onMiddleMouseDown(const GuiEvent& event) override { handleMouseDown(event, MoveMode); }
void onMiddleMouseUp(const GuiEvent& event) override { handleMouseUp(event, MoveMode); }
void onMiddleMouseDragged(const GuiEvent& event) override { handleMouseDragged(event, MoveMode); }
void onRightMouseDown(const GuiEvent& event) { handleMouseDown(event, RotateMode); }
void onRightMouseUp(const GuiEvent& event) { handleMouseUp(event, RotateMode); }
void onRightMouseDragged(const GuiEvent& event) { handleMouseDragged(event, RotateMode); }
void onRightMouseDown(const GuiEvent& event) override { handleMouseDown(event, RotateMode); }
void onRightMouseUp(const GuiEvent& event) override { handleMouseUp(event, RotateMode); }
void onRightMouseDragged(const GuiEvent& event) override { handleMouseDragged(event, RotateMode); }
void on3DMouseWheelUp(const Gui3DMouseEvent& event);
void on3DMouseWheelDown(const Gui3DMouseEvent& event);
void on3DMouseWheelUp(const Gui3DMouseEvent& event) override;
void on3DMouseWheelDown(const Gui3DMouseEvent& event) override;
///@}
// Setters/Getters
@ -234,7 +234,7 @@ public:
void refreshShape();
void updateNodeTransforms();
void get3DCursor(GuiCursor *& cursor, bool& visible, const Gui3DMouseEvent& event_);
void get3DCursor(GuiCursor *& cursor, bool& visible, const Gui3DMouseEvent& event_) override;
void fitToShape();
void setOrbitPos( const Point3F& pos );
@ -243,15 +243,15 @@ public:
/// @name Rendering
///@{
bool getCameraTransform(MatrixF* cameraMatrix);
void computeSceneBounds(Box3F& bounds);
bool getCameraTransform(MatrixF* cameraMatrix) override;
void computeSceneBounds(Box3F& bounds) override;
bool getMeshHidden(const char* name) const;
void setMeshHidden(const char* name, bool hidden);
void setAllMeshesHidden(bool hidden);
void renderWorld(const RectI& updateRect);
void renderGui(Point2I offset, const RectI& updateRect);
void renderWorld(const RectI& updateRect) override;
void renderGui(Point2I offset, const RectI& updateRect) override;
///@}
DECLARE_CONOBJECT(GuiShapeEdPreview);

View file

@ -38,27 +38,27 @@ public:
DECLARE_CONOBJECT( GuiInspectorCustomField );
virtual void setData( const char* data, bool callbacks = true );
virtual const char* getData( U32 inspectObjectIndex = 0 );
virtual void updateValue();
virtual StringTableEntry getFieldName() { return StringTable->EmptyString(); }
void setData( const char* data, bool callbacks = true ) override;
const char* getData( U32 inspectObjectIndex = 0 ) override;
void updateValue() override;
StringTableEntry getFieldName() override { return StringTable->EmptyString(); }
virtual void setDoc( const char* doc );
virtual void setToolTip( StringTableEntry data );
virtual bool onAdd();
bool onAdd() override;
virtual void setInspectorField( AbstractClassRep::Field *field,
void setInspectorField( AbstractClassRep::Field *field,
StringTableEntry caption = NULL,
const char *arrayIndex = NULL );
const char *arrayIndex = NULL ) override;
virtual GuiControl* constructEditControl();
GuiControl* constructEditControl() override;
virtual void setValue( const char* newValue );
void setValue( const char* newValue ) override;
protected:
virtual void _executeSelectedCallback();
void _executeSelectedCallback() override;
protected:

View file

@ -44,9 +44,9 @@ class GuiInspectorDatablockField : public GuiInspectorTypeMenuBase
RectI mBrowseRect;
virtual SimSet* _getDatablockSet() const { return Sim::getDataBlockSet(); }
virtual void _populateMenu( GuiPopUpMenuCtrlEx* menu );
virtual GuiControl* constructEditControl();
virtual bool updateRects();
void _populateMenu( GuiPopUpMenuCtrlEx* menu ) override;
GuiControl* constructEditControl() override;
bool updateRects() override;
public:
@ -69,7 +69,7 @@ class GuiInspectorTypeSFXDescriptionName : public GuiInspectorDatablockField
protected:
virtual SimSet* _getDatablockSet() const { return Sim::getSFXDescriptionSet(); }
SimSet* _getDatablockSet() const override { return Sim::getSFXDescriptionSet(); }
public:
@ -89,7 +89,7 @@ class GuiInspectorTypeSFXTrackName : public GuiInspectorDatablockField
protected:
virtual SimSet* _getDatablockSet() const { return Sim::getSFXTrackSet(); }
SimSet* _getDatablockSet() const override { return Sim::getSFXTrackSet(); }
public:
@ -109,7 +109,7 @@ class GuiInspectorTypeSFXEnvironmentName : public GuiInspectorDatablockField
protected:
virtual SimSet* _getDatablockSet() const { return Sim::getSFXEnvironmentSet(); }
SimSet* _getDatablockSet() const override { return Sim::getSFXEnvironmentSet(); }
public:
DECLARE_CONOBJECT(GuiInspectorTypeSFXEnvironmentName);
@ -128,7 +128,7 @@ class GuiInspectorTypeSFXAmbienceName : public GuiInspectorDatablockField
protected:
virtual SimSet* _getDatablockSet() const { return Sim::getSFXAmbienceSet(); }
SimSet* _getDatablockSet() const override { return Sim::getSFXAmbienceSet(); }
public:

View file

@ -39,24 +39,24 @@ public:
DECLARE_CONOBJECT( GuiInspectorDynamicField );
virtual void setData( const char* data, bool callbacks = true );
virtual const char* getData( U32 inspectObjectIndex = 0 );
virtual StringTableEntry getFieldName() { return ( mDynField != NULL ) ? mDynField->slotName : StringTable->insert( "" ); }
virtual StringTableEntry getRawFieldName() { return getFieldName(); }
void setData( const char* data, bool callbacks = true ) override;
const char* getData( U32 inspectObjectIndex = 0 ) override;
StringTableEntry getFieldName() override { return ( mDynField != NULL ) ? mDynField->slotName : StringTable->insert( "" ); }
StringTableEntry getRawFieldName() override { return getFieldName(); }
virtual bool onAdd();
bool onAdd() override;
void renameField( const char* newFieldName );
GuiControl* constructRenameControl();
virtual bool updateRects();
virtual void setInspectorField( AbstractClassRep::Field *field,
bool updateRects() override;
void setInspectorField( AbstractClassRep::Field *field,
StringTableEntry caption = NULL,
const char *arrayIndex = NULL );
const char *arrayIndex = NULL ) override;
protected:
virtual void _executeSelectedCallback();
void _executeSelectedCallback() override;
protected:

View file

@ -45,8 +45,8 @@ public:
// inspectGroup is overridden in GuiInspectorDynamicGroup to inspect an
// objects FieldDictionary (dynamic fields) instead of regular persistent
// fields.
bool inspectGroup();
virtual void updateAllFields();
bool inspectGroup() override;
void updateAllFields() override;
// For scriptable dynamic field additions
void addDynamicField();
@ -58,7 +58,7 @@ public:
virtual SimFieldDictionary::Entry* findDynamicFieldInDictionary( StringTableEntry fieldName );
protected:
// create our inner controls when we add
virtual bool createContent();
bool createContent() override;
};

View file

@ -45,15 +45,15 @@ public:
DECLARE_CONOBJECT( GuiInspectorVariableField );
DECLARE_CATEGORY( "Gui Editor" );
virtual bool onAdd();
bool onAdd() override;
virtual void setValue( const char* newValue );
virtual const char* getValue() { return NULL; }
virtual void updateValue();
virtual void setData( const char* data, bool callbacks = true );
virtual const char* getData( U32 inspectObjectIndex = 0 );
virtual void updateData() {};
void setValue( const char* newValue ) override;
const char* getValue() override { return NULL; }
void updateValue() override;
void setData( const char* data, bool callbacks = true ) override;
const char* getData( U32 inspectObjectIndex = 0 ) override;
void updateData() override {};
protected:
StringTableEntry mVariableName;

View file

@ -67,9 +67,9 @@ public:
DECLARE_CONOBJECT(GuiInspectorVariableGroup);
DECLARE_CATEGORY( "Gui Editor" );
virtual GuiInspectorField* constructField( S32 fieldType );
GuiInspectorField* constructField( S32 fieldType ) override;
virtual bool inspectGroup();
bool inspectGroup() override;
void clearFields();
void addField(VariableField* field);

View file

@ -43,7 +43,7 @@ public:
DECLARE_CONOBJECT( GuiVariableInspector );
DECLARE_CATEGORY( "Gui Editor" );
virtual void inspectObject( SimObject *object ) {}
void inspectObject( SimObject *object ) override {}
virtual void loadVars( String searchString );

View file

@ -35,7 +35,7 @@ bool PopupMenu::smSelectionEventHandled = false;
class PopUpNotifyRemoveEvent : public SimEvent
{
public:
void process(SimObject *object)
void process(SimObject *object) override
{
PopupMenu::smPopupMenuEvent.remove((PopupMenu *)object, &PopupMenu::handleSelectEvent);
}

View file

@ -97,8 +97,8 @@ public:
static void initPersistFields();
virtual bool onAdd();
virtual void onRemove();
bool onAdd() override;
void onRemove() override;
static PopupMenuEvent smPopupMenuEvent;
static bool smSelectionEventHandled; /// Set to true if any menu or submenu handles a selection event
@ -181,8 +181,8 @@ public:
/// it should work regardless of platform.
void handleSelectEvent(U32 popID, U32 command);
virtual bool onMessageReceived(StringTableEntry queue, const char* event, const char* data );
virtual bool onMessageObjectReceived(StringTableEntry queue, Message *msg );
bool onMessageReceived(StringTableEntry queue, const char* event, const char* data ) override;
bool onMessageObjectReceived(StringTableEntry queue, Message *msg ) override;
bool isVisible() { return mVisible; }
void setVisible(bool isVis) { mVisible = isVis; }