Replace _IRR_OVERRIDE_ macro with override keyword

The commit also establishes a precedent of leaving off the `virtual`
keyword in overrides. Although not strictly necessary, I believe this is
good for readability because it makes it clear it is an override and not
a pure virtual function, and it helps keep line lengths shorter. We
should move towards eliminating the macro altogether, but the definition
has been left in with a note on deprecation so that in-progress work
will not suffer merge conflicts.
This commit is contained in:
JosiahWI
2022-10-09 13:57:28 -05:00
committed by sfan5
parent f3a1f9f656
commit 59fc4401f1
87 changed files with 1471 additions and 1474 deletions

View File

@ -32,7 +32,7 @@ namespace scene
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
const video::SMaterial& getMaterial() const override
{
return Material;
}
@ -40,7 +40,7 @@ namespace scene
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
video::SMaterial& getMaterial() override
{
return Material;
}
@ -48,7 +48,7 @@ namespace scene
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual const void* getVertices() const _IRR_OVERRIDE_
const void* getVertices() const override
{
return Vertices.const_pointer();
}
@ -56,7 +56,7 @@ namespace scene
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual void* getVertices() _IRR_OVERRIDE_
void* getVertices() override
{
return Vertices.pointer();
}
@ -64,21 +64,21 @@ namespace scene
//! Get number of vertices
/** \return Number of vertices. */
virtual u32 getVertexCount() const _IRR_OVERRIDE_
u32 getVertexCount() const override
{
return Vertices.size();
}
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
video::E_INDEX_TYPE getIndexType() const override
{
return video::EIT_16BIT;
}
//! Get pointer to indices
/** \return Pointer to indices. */
virtual const u16* getIndices() const _IRR_OVERRIDE_
const u16* getIndices() const override
{
return Indices.const_pointer();
}
@ -86,7 +86,7 @@ namespace scene
//! Get pointer to indices
/** \return Pointer to indices. */
virtual u16* getIndices() _IRR_OVERRIDE_
u16* getIndices() override
{
return Indices.pointer();
}
@ -94,7 +94,7 @@ namespace scene
//! Get number of indices
/** \return Number of indices. */
virtual u32 getIndexCount() const _IRR_OVERRIDE_
u32 getIndexCount() const override
{
return Indices.size();
}
@ -102,7 +102,7 @@ namespace scene
//! Get the axis aligned bounding box
/** \return Axis aligned bounding box of this buffer. */
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
const core::aabbox3d<f32>& getBoundingBox() const override
{
return BoundingBox;
}
@ -111,7 +111,7 @@ namespace scene
//! Set the axis aligned bounding box
/** \param box New axis aligned bounding box for this buffer. */
//! set user axis aligned bounding box
virtual void setBoundingBox(const core::aabbox3df& box) _IRR_OVERRIDE_
void setBoundingBox(const core::aabbox3df& box) override
{
BoundingBox = box;
}
@ -119,7 +119,7 @@ namespace scene
//! Recalculate the bounding box.
/** should be called if the mesh changed. */
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
void recalculateBoundingBox() override
{
if (!Vertices.empty())
{
@ -136,43 +136,43 @@ namespace scene
//! Get type of vertex data stored in this buffer.
/** \return Type of vertex data. */
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
video::E_VERTEX_TYPE getVertexType() const override
{
return T::getType();
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
const core::vector3df& getPosition(u32 i) const override
{
return Vertices[i].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
core::vector3df& getPosition(u32 i) override
{
return Vertices[i].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
const core::vector3df& getNormal(u32 i) const override
{
return Vertices[i].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
core::vector3df& getNormal(u32 i) override
{
return Vertices[i].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
const core::vector2df& getTCoords(u32 i) const override
{
return Vertices[i].TCoords;
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
core::vector2df& getTCoords(u32 i) override
{
return Vertices[i].TCoords;
}
@ -183,7 +183,7 @@ namespace scene
or the main buffer is of standard type. Otherwise, behavior is
undefined.
*/
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_
void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) override
{
if (vertices == getVertices())
return;
@ -212,7 +212,7 @@ namespace scene
undefined.
\param other Meshbuffer to be appended to this one.
*/
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_
void append(const IMeshBuffer* const other) override
{
/*
if (this==other)
@ -238,19 +238,19 @@ namespace scene
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const override
{
return MappingHint_Vertex;
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
E_HARDWARE_MAPPING getHardwareMappingHint_Index() const override
{
return MappingHint_Index;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) override
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
MappingHint_Vertex=NewMappingHint;
@ -259,19 +259,19 @@ namespace scene
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
void setPrimitiveType(E_PRIMITIVE_TYPE type) override
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
E_PRIMITIVE_TYPE getPrimitiveType() const override
{
return PrimitiveType;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) override
{
if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX)
++ChangedID_Vertex;
@ -281,17 +281,17 @@ namespace scene
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_ {return ChangedID_Vertex;}
u32 getChangedID_Vertex() const override {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_ {return ChangedID_Index;}
u32 getChangedID_Index() const override {return ChangedID_Index;}
virtual void setHWBuffer(void *ptr) const _IRR_OVERRIDE_ {
void setHWBuffer(void *ptr) const override {
HWBuffer = ptr;
}
virtual void *getHWBuffer() const _IRR_OVERRIDE_ {
void *getHWBuffer() const override {
return HWBuffer;
}