mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-02 00:00:26 +02:00
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:
@ -30,37 +30,37 @@ public:
|
||||
~CAttributes();
|
||||
|
||||
//! Returns amount of attributes in this collection of attributes.
|
||||
virtual u32 getAttributeCount() const _IRR_OVERRIDE_;
|
||||
u32 getAttributeCount() const override;
|
||||
|
||||
//! Returns attribute name by index.
|
||||
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
|
||||
virtual const c8* getAttributeName(s32 index) const _IRR_OVERRIDE_;
|
||||
const c8* getAttributeName(s32 index) const override;
|
||||
|
||||
//! Returns the type of an attribute
|
||||
//! \param attributeName: Name for the attribute
|
||||
virtual E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) const _IRR_OVERRIDE_;
|
||||
E_ATTRIBUTE_TYPE getAttributeType(const c8* attributeName) const override;
|
||||
|
||||
//! Returns attribute type by index.
|
||||
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
|
||||
virtual E_ATTRIBUTE_TYPE getAttributeType(s32 index) const _IRR_OVERRIDE_;
|
||||
E_ATTRIBUTE_TYPE getAttributeType(s32 index) const override;
|
||||
|
||||
//! Returns the type string of the attribute
|
||||
//! \param attributeName: String for the attribute type
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
virtual const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const _IRR_OVERRIDE_;
|
||||
const wchar_t* getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound = L"unknown") const override;
|
||||
|
||||
//! Returns the type string of the attribute by index.
|
||||
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
|
||||
virtual const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const _IRR_OVERRIDE_;
|
||||
const wchar_t* getAttributeTypeString(s32 index, const wchar_t* defaultNotFound = L"unknown") const override;
|
||||
|
||||
//! Returns if an attribute with a name exists
|
||||
virtual bool existsAttribute(const c8* attributeName) const _IRR_OVERRIDE_;
|
||||
bool existsAttribute(const c8* attributeName) const override;
|
||||
|
||||
//! Returns attribute index from name, -1 if not found
|
||||
virtual s32 findAttribute(const c8* attributeName) const _IRR_OVERRIDE_;
|
||||
s32 findAttribute(const c8* attributeName) const override;
|
||||
|
||||
//! Removes all attributes
|
||||
virtual void clear() _IRR_OVERRIDE_;
|
||||
void clear() override;
|
||||
|
||||
|
||||
/*
|
||||
@ -70,23 +70,23 @@ public:
|
||||
*/
|
||||
|
||||
//! Adds an attribute as integer
|
||||
virtual void addInt(const c8* attributeName, s32 value) _IRR_OVERRIDE_;
|
||||
void addInt(const c8* attributeName, s32 value) override;
|
||||
|
||||
//! Sets an attribute as integer value
|
||||
virtual void setAttribute(const c8* attributeName, s32 value) _IRR_OVERRIDE_;
|
||||
void setAttribute(const c8* attributeName, s32 value) override;
|
||||
|
||||
//! Gets an attribute as integer value
|
||||
//! \param attributeName: Name of the attribute to get.
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
//! \return Returns value of the attribute previously set by setAttribute()
|
||||
virtual s32 getAttributeAsInt(const c8* attributeName, irr::s32 defaultNotFound=0) const _IRR_OVERRIDE_;
|
||||
s32 getAttributeAsInt(const c8* attributeName, irr::s32 defaultNotFound=0) const override;
|
||||
|
||||
//! Gets an attribute as integer value
|
||||
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
|
||||
virtual s32 getAttributeAsInt(s32 index) const _IRR_OVERRIDE_;
|
||||
s32 getAttributeAsInt(s32 index) const override;
|
||||
|
||||
//! Sets an attribute as integer value
|
||||
virtual void setAttribute(s32 index, s32 value) _IRR_OVERRIDE_;
|
||||
void setAttribute(s32 index, s32 value) override;
|
||||
|
||||
/*
|
||||
|
||||
@ -95,23 +95,23 @@ public:
|
||||
*/
|
||||
|
||||
//! Adds an attribute as float
|
||||
virtual void addFloat(const c8* attributeName, f32 value) _IRR_OVERRIDE_;
|
||||
void addFloat(const c8* attributeName, f32 value) override;
|
||||
|
||||
//! Sets a attribute as float value
|
||||
virtual void setAttribute(const c8* attributeName, f32 value) _IRR_OVERRIDE_;
|
||||
void setAttribute(const c8* attributeName, f32 value) override;
|
||||
|
||||
//! Gets an attribute as float value
|
||||
//! \param attributeName: Name of the attribute to get.
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
//! \return Returns value of the attribute previously set by setAttribute()
|
||||
virtual f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) const _IRR_OVERRIDE_;
|
||||
f32 getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound=0.f) const override;
|
||||
|
||||
//! Gets an attribute as float value
|
||||
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
|
||||
virtual f32 getAttributeAsFloat(s32 index) const _IRR_OVERRIDE_;
|
||||
f32 getAttributeAsFloat(s32 index) const override;
|
||||
|
||||
//! Sets an attribute as float value
|
||||
virtual void setAttribute(s32 index, f32 value) _IRR_OVERRIDE_;
|
||||
void setAttribute(s32 index, f32 value) override;
|
||||
|
||||
|
||||
/*
|
||||
@ -119,23 +119,23 @@ public:
|
||||
*/
|
||||
|
||||
//! Adds an attribute as bool
|
||||
virtual void addBool(const c8* attributeName, bool value) _IRR_OVERRIDE_;
|
||||
void addBool(const c8* attributeName, bool value) override;
|
||||
|
||||
//! Sets an attribute as boolean value
|
||||
virtual void setAttribute(const c8* attributeName, bool value) _IRR_OVERRIDE_;
|
||||
void setAttribute(const c8* attributeName, bool value) override;
|
||||
|
||||
//! Gets an attribute as boolean value
|
||||
//! \param attributeName: Name of the attribute to get.
|
||||
//! \param defaultNotFound Value returned when attributeName was not found
|
||||
//! \return Returns value of the attribute previously set by setAttribute()
|
||||
virtual bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) const _IRR_OVERRIDE_;
|
||||
bool getAttributeAsBool(const c8* attributeName, bool defaultNotFound=false) const override;
|
||||
|
||||
//! Gets an attribute as boolean value
|
||||
//! \param index: Index value, must be between 0 and getAttributeCount()-1.
|
||||
virtual bool getAttributeAsBool(s32 index) const _IRR_OVERRIDE_;
|
||||
bool getAttributeAsBool(s32 index) const override;
|
||||
|
||||
//! Sets an attribute as boolean value
|
||||
virtual void setAttribute(s32 index, bool value) _IRR_OVERRIDE_;
|
||||
void setAttribute(s32 index, bool value) override;
|
||||
|
||||
protected:
|
||||
|
||||
|
Reference in New Issue
Block a user