1
0

API BREAKER: Replacing defines in irrTypes.h which are conflicting with c++ reserved identifier rules.

C++ has undefined behavior for identifiers starting with __ or with _ followed by an uppercase letter.
We still have many more (in IrrCompileConfig.h and in all header-guards), will likely replace those later as well.
As a workaround for users which might use irrlicht defines in their code, I've added the header irrLegacyDefines.h
Including that allows to continue using old defines for a while - or make it easier to have code which compiles 
with old and new Irrlicht library versions.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6251 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2021-08-27 12:55:10 +00:00
parent ee180dbd24
commit ffd7b63af0
289 changed files with 3401 additions and 3379 deletions

View File

@@ -31,7 +31,7 @@ namespace scene
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
virtual const video::SMaterial& getMaterial() const IRR_OVERRIDE
{
return Material;
}
@@ -39,7 +39,7 @@ namespace scene
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
virtual video::SMaterial& getMaterial() IRR_OVERRIDE
{
return Material;
}
@@ -47,7 +47,7 @@ namespace scene
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual const void* getVertices() const _IRR_OVERRIDE_
virtual const void* getVertices() const IRR_OVERRIDE
{
return Vertices.const_pointer();
}
@@ -55,7 +55,7 @@ namespace scene
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual void* getVertices() _IRR_OVERRIDE_
virtual void* getVertices() IRR_OVERRIDE
{
return Vertices.pointer();
}
@@ -63,21 +63,21 @@ namespace scene
//! Get number of vertices
/** \return Number of vertices. */
virtual u32 getVertexCount() const _IRR_OVERRIDE_
virtual u32 getVertexCount() const IRR_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_
virtual video::E_INDEX_TYPE getIndexType() const IRR_OVERRIDE
{
return video::EIT_16BIT;
}
//! Get pointer to indices
/** \return Pointer to indices. */
virtual const u16* getIndices() const _IRR_OVERRIDE_
virtual const u16* getIndices() const IRR_OVERRIDE
{
return Indices.const_pointer();
}
@@ -85,7 +85,7 @@ namespace scene
//! Get pointer to indices
/** \return Pointer to indices. */
virtual u16* getIndices() _IRR_OVERRIDE_
virtual u16* getIndices() IRR_OVERRIDE
{
return Indices.pointer();
}
@@ -93,7 +93,7 @@ namespace scene
//! Get number of indices
/** \return Number of indices. */
virtual u32 getIndexCount() const _IRR_OVERRIDE_
virtual u32 getIndexCount() const IRR_OVERRIDE
{
return Indices.size();
}
@@ -101,7 +101,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_
virtual const core::aabbox3d<f32>& getBoundingBox() const IRR_OVERRIDE
{
return BoundingBox;
}
@@ -110,7 +110,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_
virtual void setBoundingBox(const core::aabbox3df& box) IRR_OVERRIDE
{
BoundingBox = box;
}
@@ -118,7 +118,7 @@ namespace scene
//! Recalculate the bounding box.
/** should be called if the mesh changed. */
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
virtual void recalculateBoundingBox() IRR_OVERRIDE
{
if (!Vertices.empty())
{
@@ -135,43 +135,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_
virtual video::E_VERTEX_TYPE getVertexType() const IRR_OVERRIDE
{
return T::getType();
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
virtual const core::vector3df& getPosition(u32 i) const IRR_OVERRIDE
{
return Vertices[i].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
virtual core::vector3df& getPosition(u32 i) IRR_OVERRIDE
{
return Vertices[i].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
virtual const core::vector3df& getNormal(u32 i) const IRR_OVERRIDE
{
return Vertices[i].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
virtual core::vector3df& getNormal(u32 i) IRR_OVERRIDE
{
return Vertices[i].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
virtual const core::vector2df& getTCoords(u32 i) const IRR_OVERRIDE
{
return Vertices[i].TCoords;
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
virtual core::vector2df& getTCoords(u32 i) IRR_OVERRIDE
{
return Vertices[i].TCoords;
}
@@ -182,7 +182,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_
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) IRR_OVERRIDE
{
if (vertices == getVertices())
return;
@@ -211,7 +211,7 @@ namespace scene
undefined.
\param other Meshbuffer to be appended to this one.
*/
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_
virtual void append(const IMeshBuffer* const other) IRR_OVERRIDE
{
/*
if (this==other)
@@ -237,19 +237,19 @@ namespace scene
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const IRR_OVERRIDE
{
return MappingHint_Vertex;
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const IRR_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_
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) IRR_OVERRIDE
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
MappingHint_Vertex=NewMappingHint;
@@ -258,19 +258,19 @@ namespace scene
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) IRR_OVERRIDE
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
virtual E_PRIMITIVE_TYPE getPrimitiveType() const IRR_OVERRIDE
{
return PrimitiveType;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) IRR_OVERRIDE
{
if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX)
++ChangedID_Vertex;
@@ -280,11 +280,11 @@ 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;}
virtual u32 getChangedID_Vertex() const IRR_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;}
virtual u32 getChangedID_Index() const IRR_OVERRIDE {return ChangedID_Index;}
u32 ChangedID_Vertex;
u32 ChangedID_Index;