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

@ -37,10 +37,10 @@ namespace video
virtual ~CWebGL1Driver();
//! Returns type of video driver
virtual E_DRIVER_TYPE getDriverType() const _IRR_OVERRIDE_;
E_DRIVER_TYPE getDriverType() const override;
//! Is VBO recommended on this mesh?
virtual bool isHardwareBufferRecommend(const scene::IMeshBuffer* mb) _IRR_OVERRIDE_
bool isHardwareBufferRecommend(const scene::IMeshBuffer* mb) override
{
// All buffers must be bound, WebGL doesn't allow sending unbound buffers at all.
return true;
@ -49,22 +49,22 @@ namespace video
//! draws a vertex primitive list
virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primitiveCount,
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) _IRR_OVERRIDE_;
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType) override;
//! Draws a mesh buffer
virtual void drawMeshBuffer(const scene::IMeshBuffer* mb) _IRR_OVERRIDE_;
void drawMeshBuffer(const scene::IMeshBuffer* mb) override;
virtual void draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color = SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture = false) _IRR_OVERRIDE_;
SColor color = SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture = false) override;
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors = 0, bool useAlphaChannelOfTexture = false) _IRR_OVERRIDE_;
const video::SColor* const colors = 0, bool useAlphaChannelOfTexture = false) override;
// internally used
virtual void draw2DImage(const video::ITexture* texture, u32 layer, bool flip) _IRR_OVERRIDE_;
void draw2DImage(const video::ITexture* texture, u32 layer, bool flip) override;
//! draws a set of 2d images
virtual void draw2DImageBatch(const video::ITexture* texture,
@ -73,58 +73,58 @@ namespace video
const core::array<s32>& indices, s32 kerningWidth = 0,
const core::rect<s32>* clipRect = 0,
SColor color = SColor(255, 255, 255, 255),
bool useAlphaChannelOfTexture = false) _IRR_OVERRIDE_;
bool useAlphaChannelOfTexture = false) override;
void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect,
SColor color,
bool useAlphaChannelOfTexture) _IRR_OVERRIDE_;
bool useAlphaChannelOfTexture) override;
//! draw an 2d rectangle
virtual void draw2DRectangle(SColor color, const core::rect<s32>& pos,
const core::rect<s32>* clip = 0) _IRR_OVERRIDE_;
const core::rect<s32>* clip = 0) override;
//!Draws an 2d rectangle with a gradient.
virtual void draw2DRectangle(const core::rect<s32>& pos,
SColor colorLeftUp, SColor colorRightUp, SColor colorLeftDown, SColor colorRightDown,
const core::rect<s32>* clip = 0) _IRR_OVERRIDE_;
const core::rect<s32>* clip = 0) override;
//! Draws a 2d line.
virtual void draw2DLine(const core::position2d<s32>& start,
const core::position2d<s32>& end,
SColor color = SColor(255, 255, 255, 255)) _IRR_OVERRIDE_;
SColor color = SColor(255, 255, 255, 255)) override;
//! Draws a single pixel
virtual void drawPixel(u32 x, u32 y, const SColor & color) _IRR_OVERRIDE_;
void drawPixel(u32 x, u32 y, const SColor & color) override;
//! Draws a 3d line.
virtual void draw3DLine(const core::vector3df& start,
const core::vector3df& end,
SColor color = SColor(255, 255, 255, 255)) _IRR_OVERRIDE_;
SColor color = SColor(255, 255, 255, 255)) override;
//! Draws a shadow volume into the stencil buffer.
virtual void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible=0) _IRR_OVERRIDE_;
void drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible=0) override;
//! Fills the stencil shadow with color.
virtual void drawStencilShadow(bool clearStencilBuffer=false,
video::SColor leftUpEdge = video::SColor(0,0,0,0),
video::SColor rightUpEdge = video::SColor(0,0,0,0),
video::SColor leftDownEdge = video::SColor(0,0,0,0),
video::SColor rightDownEdge = video::SColor(0,0,0,0)) _IRR_OVERRIDE_;
video::SColor rightDownEdge = video::SColor(0,0,0,0)) override;
//! Get ZBuffer bits.
virtual GLenum getZBufferBits() const _IRR_OVERRIDE_;
GLenum getZBufferBits() const override;
virtual bool getColorFormatParameters(ECOLOR_FORMAT format, GLint& internalFormat, GLenum& pixelFormat,
GLenum& pixelType, void(**converter)(const void*, s32, void*)) const _IRR_OVERRIDE_;
GLenum& pixelType, void(**converter)(const void*, s32, void*)) const override;
protected:
// create a meshbuffer which has as many vertices as indices
scene::SMeshBuffer* createSimpleMeshBuffer(irr::u32 numVertices, scene::E_PRIMITIVE_TYPE primitiveType, scene::E_HARDWARE_MAPPING vertexMappingHint=scene::EHM_STREAM, scene::E_HARDWARE_MAPPING indexMappingHint=scene::EHM_STATIC) const;
virtual bool genericDriverInit(const core::dimension2d<u32>& screenSize, bool stencilBuffer) _IRR_OVERRIDE_;
bool genericDriverInit(const core::dimension2d<u32>& screenSize, bool stencilBuffer) override;
void initWebGLExtensions();
private: