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

@ -109,9 +109,9 @@ public:
DECLARE_CONOBJECT( ForestBrush );
virtual bool onAdd();
bool onAdd() override;
virtual void addObject(SimObject*);
void addObject(SimObject*) override;
static SimGroup* getGroup();
@ -135,9 +135,9 @@ public:
DECLARE_CONOBJECT(ForestBrushGroup);
virtual bool onAdd();
bool onAdd() override;
virtual void addObject(SimObject*);
void addObject(SimObject*) override;
bool containsBrushData(const ForestBrush* inData);
protected:

View file

@ -62,20 +62,20 @@ public:
// SimObject
DECLARE_CONOBJECT( ForestBrushTool );
static void initPersistFields();
virtual bool onAdd();
virtual void onRemove();
bool onAdd() override;
void onRemove() override;
// ForestTool
virtual void on3DMouseDown( const Gui3DMouseEvent &evt );
virtual void on3DMouseUp( const Gui3DMouseEvent &evt );
virtual void on3DMouseMove( const Gui3DMouseEvent &evt );
virtual void on3DMouseDragged( const Gui3DMouseEvent &evt );
virtual bool onMouseWheel(const GuiEvent &evt );
virtual void onRender3D();
virtual void onRender2D();
virtual void onActivated( const Gui3DMouseEvent &lastEvent );
virtual void onDeactivated();
virtual bool updateGuiInfo();
void on3DMouseDown( const Gui3DMouseEvent &evt ) override;
void on3DMouseUp( const Gui3DMouseEvent &evt ) override;
void on3DMouseMove( const Gui3DMouseEvent &evt ) override;
void on3DMouseDragged( const Gui3DMouseEvent &evt ) override;
bool onMouseWheel(const GuiEvent &evt ) override;
void onRender3D() override;
void onRender2D() override;
void onActivated( const Gui3DMouseEvent &lastEvent ) override;
void onDeactivated() override;
bool updateGuiInfo() override;
// ForestBrushTool
void setSize( F32 val );
@ -139,7 +139,7 @@ class ForestBrushToolEvent : public SimEvent
{
public:
void process( SimObject *object )
void process( SimObject *object ) override
{
((ForestBrushTool*)object)->_onStroke();
}

View file

@ -58,30 +58,30 @@ class ForestEditorCtrl : public EditTSCtrl
DECLARE_CONOBJECT( ForestEditorCtrl );
// SimObject
bool onAdd();
bool onAdd() override;
static void initPersistFields();
// GuiControl
virtual bool onWake();
virtual void onSleep();
virtual void onMouseUp( const GuiEvent &event_ );
bool onWake() override;
void onSleep() override;
void onMouseUp( const GuiEvent &event_ ) override;
// EditTSCtrl
void get3DCursor( GuiCursor *&cursor, bool &visible, const Gui3DMouseEvent &event_ );
void on3DMouseDown( const Gui3DMouseEvent &event_ );
void on3DMouseUp( const Gui3DMouseEvent &event_ );
void on3DMouseMove( const Gui3DMouseEvent &event_ );
void on3DMouseDragged( const Gui3DMouseEvent &event_ );
void on3DMouseEnter( const Gui3DMouseEvent &event_ );
void on3DMouseLeave( const Gui3DMouseEvent &event_ );
void on3DRightMouseDown( const Gui3DMouseEvent &event_ );
void on3DRightMouseUp( const Gui3DMouseEvent &event_ );
bool onMouseWheelUp(const GuiEvent &event_);
bool onMouseWheelDown(const GuiEvent &event_);
void updateGuiInfo();
void updateGizmo();
void renderScene( const RectI &updateRect );
void renderGui( Point2I offset, const RectI &updateRect );
void get3DCursor( GuiCursor *&cursor, bool &visible, const Gui3DMouseEvent &event_ ) override;
void on3DMouseDown( const Gui3DMouseEvent &event_ ) override;
void on3DMouseUp( const Gui3DMouseEvent &event_ ) override;
void on3DMouseMove( const Gui3DMouseEvent &event_ ) override;
void on3DMouseDragged( const Gui3DMouseEvent &event_ ) override;
void on3DMouseEnter( const Gui3DMouseEvent &event_ ) override;
void on3DMouseLeave( const Gui3DMouseEvent &event_ ) override;
void on3DRightMouseDown( const Gui3DMouseEvent &event_ ) override;
void on3DRightMouseUp( const Gui3DMouseEvent &event_ ) override;
bool onMouseWheelUp(const GuiEvent &event_) override;
bool onMouseWheelDown(const GuiEvent &event_) override;
void updateGuiInfo() override;
void updateGizmo() override;
void renderScene( const RectI &updateRect ) override;
void renderGui( Point2I offset, const RectI &updateRect ) override;
/// Causes the editor to reselect the active forest.
bool updateActiveForest( bool createNew );

View file

@ -47,9 +47,9 @@ public:
protected:
void offsetObject( ForestItem &object, const Point3F &delta );
void rotateObject( ForestItem &object, const EulerF &delta, const Point3F &origin );
void scaleObject( ForestItem &object, const Point3F &delta );
void offsetObject( ForestItem &object, const Point3F &delta ) override;
void rotateObject( ForestItem &object, const EulerF &delta, const Point3F &origin ) override;
void scaleObject( ForestItem &object, const Point3F &delta ) override;
protected:
@ -93,17 +93,17 @@ class ForestSelectionTool : public ForestTool
DECLARE_CONOBJECT( ForestSelectionTool );
// ForestTool
virtual void setParentEditor( ForestEditorCtrl *editor );
virtual void setActiveForest( Forest *forest );
virtual void on3DMouseDown( const Gui3DMouseEvent &evt );
virtual void on3DMouseUp( const Gui3DMouseEvent &evt );
virtual void on3DMouseMove( const Gui3DMouseEvent &evt );
virtual void on3DMouseDragged( const Gui3DMouseEvent &evt );
virtual void onRender3D();
virtual void onRender2D();
virtual bool updateGuiInfo();
virtual void updateGizmo();
virtual void onUndoAction();
void setParentEditor( ForestEditorCtrl *editor ) override;
void setActiveForest( Forest *forest ) override;
void on3DMouseDown( const Gui3DMouseEvent &evt ) override;
void on3DMouseUp( const Gui3DMouseEvent &evt ) override;
void on3DMouseMove( const Gui3DMouseEvent &evt ) override;
void on3DMouseDragged( const Gui3DMouseEvent &evt ) override;
void onRender3D() override;
void onRender2D() override;
bool updateGuiInfo() override;
void updateGizmo() override;
void onUndoAction() override;
S32 getSelectionCount() const { return mSelection.size(); }

View file

@ -45,8 +45,8 @@ public:
ForestUndoAction( const Resource<ForestData> &data, ForestEditorCtrl *editor, const char *description );
// UndoAction
virtual void undo() {}
virtual void redo() {}
void undo() override {}
void redo() override {}
protected:
@ -72,8 +72,8 @@ public:
F32 scale );
// UndoAction
virtual void undo();
virtual void redo();
void undo() override;
void redo() override;
};
@ -91,8 +91,8 @@ public:
void removeItem( const Vector<ForestItem> &itemList );
// UndoAction
virtual void undo();
virtual void redo();
void undo() override;
void redo() override;
};
@ -107,8 +107,8 @@ public:
void saveItem( const ForestItem &item );
virtual void undo() { _swapState(); }
virtual void redo() { _swapState(); }
void undo() override { _swapState(); }
void redo() override { _swapState(); }
protected:

View file

@ -152,37 +152,37 @@ public:
static void initPersistFields();
// SimObject
bool onAdd();
void onRemove();
bool onAdd() override;
void onRemove() override;
/// Overloaded from SceneObject to properly update
/// the client side forest when changes occur within
/// the mission editor.
void inspectPostApply();
void inspectPostApply() override;
/// Overloaded from SceneObject for updating the
/// client side position of the forest.
void setTransform( const MatrixF &mat );
void setTransform( const MatrixF &mat ) override;
void prepRenderImage( SceneRenderState *state );
void prepRenderImage( SceneRenderState *state ) override;
bool isTreeInRange( const Point2F& point, F32 radius ) const;
// Network
U32 packUpdate( NetConnection *conn, U32 mask, BitStream *stream );
void unpackUpdate( NetConnection *conn, BitStream *stream );
U32 packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) override;
void unpackUpdate( NetConnection *conn, BitStream *stream ) override;
//IForestCollision *getCollision() const { return mCollision; }
// SceneObject - Collision
virtual void buildConvex( const Box3F& box, Convex* convex );
virtual bool buildPolyList( PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF &sphere );
virtual bool castRay( const Point3F &start, const Point3F &end, RayInfo *outInfo );
virtual bool castRayRendered( const Point3F &start, const Point3F &end, RayInfo *outInfo );
virtual bool collideBox( const Point3F &start, const Point3F &end, RayInfo *outInfo );
void buildConvex( const Box3F& box, Convex* convex ) override;
bool buildPolyList( PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF &sphere ) override;
bool castRay( const Point3F &start, const Point3F &end, RayInfo *outInfo ) override;
bool castRayRendered( const Point3F &start, const Point3F &end, RayInfo *outInfo ) override;
bool collideBox( const Point3F &start, const Point3F &end, RayInfo *outInfo ) override;
// SceneObject - Other
virtual void applyRadialImpulse( const Point3F &origin, F32 radius, F32 magnitude );
void applyRadialImpulse( const Point3F &origin, F32 radius, F32 magnitude ) override;
bool castRayBase( const Point3F &start, const Point3F &end, RayInfo *outInfo, bool rendered );
@ -203,7 +203,7 @@ public:
void saveDataFile( const char *path = NULL );
///
void clear() { mData->clear(); }
void clear() override { mData->clear(); }
/// Called to rebuild the collision state.
void updateCollision();

View file

@ -66,12 +66,12 @@ public:
}
void calculateTransform( const MatrixF &worldXfrm );
const MatrixF& getTransform() const { return mTransform; }
Box3F getBoundingBox() const;
Box3F getBoundingBox( const MatrixF &mat, const Point3F &scale) const;
Point3F support( const VectorF &v ) const;
void getFeatures( const MatrixF &mat, const VectorF &n, ConvexFeature *cf );
void getPolyList( AbstractPolyList *list);
const MatrixF& getTransform() const override { return mTransform; }
Box3F getBoundingBox() const override;
Box3F getBoundingBox( const MatrixF &mat, const Point3F &scale) const override;
Point3F support( const VectorF &v ) const override;
void getFeatures( const MatrixF &mat, const VectorF &n, ConvexFeature *cf ) override;
void getPolyList( AbstractPolyList *list) override;
public:

View file

@ -111,10 +111,10 @@ public:
static void consoleInit();
static void initPersistFields();
virtual void onNameChange(const char *name);
virtual bool onAdd();
virtual void packData(BitStream* stream);
virtual void unpackData(BitStream* stream);
void onNameChange(const char *name) override;
bool onAdd() override;
void packData(BitStream* stream) override;
void unpackData(BitStream* stream) override;
/// Called from Forest the first time a datablock is used
/// in order to lazy load content.

View file

@ -196,20 +196,20 @@ public:
void updateMountPosition();
// SceneObject
virtual void setTransform( const MatrixF &mat );
void prepRenderImage( SceneRenderState *state );
void setTransform( const MatrixF &mat ) override;
void prepRenderImage( SceneRenderState *state ) override;
// SimObject
bool onAdd();
void onRemove();
void inspectPostApply();
void onEditorEnable();
void onEditorDisable();
void onDeleteNotify(SimObject *object);
bool onAdd() override;
void onRemove() override;
void inspectPostApply() override;
void onEditorEnable() override;
void onEditorDisable() override;
void onDeleteNotify(SimObject *object) override;
// NetObject
U32 packUpdate( NetConnection *conn, U32 mask, BitStream *stream );
void unpackUpdate( NetConnection *conn, BitStream *stream );
U32 packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) override;
void unpackUpdate( NetConnection *conn, BitStream *stream ) override;
// ConObject.
static void initPersistFields();

View file

@ -62,9 +62,9 @@ protected:
static WindAdvanceSignal smAdvanceSignal;
virtual void interpolateTick( F32 delta ) {};
virtual void processTick();
virtual void advanceTime( F32 timeDelta ) {};
void interpolateTick( F32 delta ) override {};
void processTick() override;
void advanceTime( F32 timeDelta ) override {};
public:

View file

@ -43,22 +43,22 @@ public:
WindDeformationGLSL();
virtual void processVert( Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd );
void processVert( Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd ) override;
virtual String getName()
String getName() override
{
return "Wind Effect";
}
virtual void determineFeature( Material *material,
void determineFeature( Material *material,
const GFXVertexFormat *vertexFormat,
U32 stageNum,
const FeatureType &type,
const FeatureSet &features,
MaterialFeatureData *outFeatureData );
MaterialFeatureData *outFeatureData ) override;
virtual ShaderFeatureConstHandles* createConstHandles( GFXShader *shader, SimObject *userObject );
ShaderFeatureConstHandles* createConstHandles( GFXShader *shader, SimObject *userObject ) override;
};
DeclareFeatureType( MFT_WindEffect );

View file

@ -43,22 +43,22 @@ public:
WindDeformationHLSL();
virtual void processVert( Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd );
void processVert( Vector<ShaderComponent*> &componentList,
const MaterialFeatureData &fd ) override;
virtual String getName()
String getName() override
{
return "Wind Effect";
}
virtual void determineFeature( Material *material,
void determineFeature( Material *material,
const GFXVertexFormat *vertexFormat,
U32 stageNum,
const FeatureType &type,
const FeatureSet &features,
MaterialFeatureData *outFeatureData );
MaterialFeatureData *outFeatureData ) override;
virtual ShaderFeatureConstHandles* createConstHandles( GFXShader *shader, SimObject *userObject );
ShaderFeatureConstHandles* createConstHandles( GFXShader *shader, SimObject *userObject ) override;
};
DeclareFeatureType( MFT_WindEffect );

View file

@ -52,9 +52,9 @@ protected:
TSLastDetail *mDetail;
// ForestCellBatch
virtual bool _prepBatch( const ForestItem &item );
virtual void _rebuildBatch();
virtual void _render( const SceneRenderState *state );
bool _prepBatch( const ForestItem &item ) override;
void _rebuildBatch() override;
void _render( const SceneRenderState *state ) override;
public:

View file

@ -63,7 +63,7 @@ protected:
void _updateCollisionDetails();
// ForestItemData
void _preload() { _loadShape(); }
void _preload() override { _loadShape(); }
public:
@ -71,11 +71,11 @@ public:
TSForestItemData();
virtual ~TSForestItemData();
bool preload( bool server, String &errorBuffer );
void onRemove();
bool onAdd();
bool preload( bool server, String &errorBuffer ) override;
void onRemove() override;
bool onAdd() override;
virtual void inspectPostApply();
void inspectPostApply() override;
TSLastDetail* getLastDetail() const;
@ -86,10 +86,10 @@ public:
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
// ForestItemData
const Box3F& getObjBox() const { return mShape ? mShape->mBounds : Box3F::Zero; }
bool render( TSRenderState *rdata, const ForestItem& item ) const;
ForestCellBatch* allocateBatch() const;
bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const;
const Box3F& getObjBox() const override { return mShape ? mShape->mBounds : Box3F::Zero; }
bool render( TSRenderState *rdata, const ForestItem& item ) const override;
ForestCellBatch* allocateBatch() const override;
bool canBillboard( const SceneRenderState *state, const ForestItem &item, F32 distToCamera ) const override;
bool buildPolyList( const ForestItem& item, AbstractPolyList *polyList, const Box3F *box ) const { return false; }
};

View file

@ -40,10 +40,10 @@ public:
GFXShaderConstHandle *mWindParams;
// ShaderFeatureConstHandles
virtual void init( GFXShader *shader );
virtual void setConsts( SceneRenderState *state,
void init( GFXShader *shader ) override;
void setConsts( SceneRenderState *state,
const SceneData &sgData,
GFXShaderConstBuffer *buffer );
GFXShaderConstBuffer *buffer ) override;
};