mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-07 02:30:25 +02:00
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:
@ -66,7 +66,7 @@ public:
|
||||
|
||||
//! Reads forward to the next xml node.
|
||||
//! \return Returns false, if there was no further node.
|
||||
virtual bool read() _IRR_OVERRIDE_
|
||||
virtual bool read() IRR_OVERRIDE
|
||||
{
|
||||
// if not end reached, parse the node
|
||||
if (P && ((unsigned int)(P - TextBegin) < TextSize - 1) && (*P != 0))
|
||||
@ -79,21 +79,21 @@ public:
|
||||
|
||||
|
||||
//! Returns the type of the current XML node.
|
||||
virtual EXML_NODE getNodeType() const _IRR_OVERRIDE_
|
||||
virtual EXML_NODE getNodeType() const IRR_OVERRIDE
|
||||
{
|
||||
return CurrentNodeType;
|
||||
}
|
||||
|
||||
|
||||
//! Returns attribute count of the current XML node.
|
||||
virtual unsigned int getAttributeCount() const _IRR_OVERRIDE_
|
||||
virtual unsigned int getAttributeCount() const IRR_OVERRIDE
|
||||
{
|
||||
return Attributes.size();
|
||||
}
|
||||
|
||||
|
||||
//! Returns name of an attribute.
|
||||
virtual const char_type* getAttributeName(int idx) const _IRR_OVERRIDE_
|
||||
virtual const char_type* getAttributeName(int idx) const IRR_OVERRIDE
|
||||
{
|
||||
if ((u32)idx >= Attributes.size())
|
||||
return 0;
|
||||
@ -103,7 +103,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute.
|
||||
virtual const char_type* getAttributeValue(int idx) const _IRR_OVERRIDE_
|
||||
virtual const char_type* getAttributeValue(int idx) const IRR_OVERRIDE
|
||||
{
|
||||
if ((unsigned int)idx >= Attributes.size())
|
||||
return 0;
|
||||
@ -113,7 +113,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute.
|
||||
virtual const char_type* getAttributeValue(const char_type* name) const _IRR_OVERRIDE_
|
||||
virtual const char_type* getAttributeValue(const char_type* name) const IRR_OVERRIDE
|
||||
{
|
||||
const SAttribute* attr = getAttributeByName(name);
|
||||
if (!attr)
|
||||
@ -124,7 +124,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute
|
||||
virtual const char_type* getAttributeValueSafe(const char_type* name) const _IRR_OVERRIDE_
|
||||
virtual const char_type* getAttributeValueSafe(const char_type* name) const IRR_OVERRIDE
|
||||
{
|
||||
const SAttribute* attr = getAttributeByName(name);
|
||||
if (!attr)
|
||||
@ -136,7 +136,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute as integer.
|
||||
virtual int getAttributeValueAsInt(const char_type* name, int defaultNotFound) const _IRR_OVERRIDE_
|
||||
virtual int getAttributeValueAsInt(const char_type* name, int defaultNotFound) const IRR_OVERRIDE
|
||||
{
|
||||
const SAttribute* attr = getAttributeByName(name);
|
||||
if (!attr)
|
||||
@ -148,7 +148,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute as integer.
|
||||
virtual int getAttributeValueAsInt(int idx, int defaultNotFound) const _IRR_OVERRIDE_
|
||||
virtual int getAttributeValueAsInt(int idx, int defaultNotFound) const IRR_OVERRIDE
|
||||
{
|
||||
const char_type* attrvalue = getAttributeValue(idx);
|
||||
if (!attrvalue)
|
||||
@ -160,7 +160,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute as float.
|
||||
virtual float getAttributeValueAsFloat(const char_type* name, float defaultNotFound) const _IRR_OVERRIDE_
|
||||
virtual float getAttributeValueAsFloat(const char_type* name, float defaultNotFound) const IRR_OVERRIDE
|
||||
{
|
||||
const SAttribute* attr = getAttributeByName(name);
|
||||
if (!attr)
|
||||
@ -172,7 +172,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the value of an attribute as float.
|
||||
virtual float getAttributeValueAsFloat(int idx, float defaultNotFound) const _IRR_OVERRIDE_
|
||||
virtual float getAttributeValueAsFloat(int idx, float defaultNotFound) const IRR_OVERRIDE
|
||||
{
|
||||
const char_type* attrvalue = getAttributeValue(idx);
|
||||
if (!attrvalue)
|
||||
@ -184,33 +184,33 @@ public:
|
||||
|
||||
|
||||
//! Returns the name of the current node.
|
||||
virtual const char_type* getNodeName() const _IRR_OVERRIDE_
|
||||
virtual const char_type* getNodeName() const IRR_OVERRIDE
|
||||
{
|
||||
return NodeName.c_str();
|
||||
}
|
||||
|
||||
|
||||
//! Returns data of the current node.
|
||||
virtual const char_type* getNodeData() const _IRR_OVERRIDE_
|
||||
virtual const char_type* getNodeData() const IRR_OVERRIDE
|
||||
{
|
||||
return NodeName.c_str();
|
||||
}
|
||||
|
||||
|
||||
//! Returns if an element is an empty element, like <foo />
|
||||
virtual bool isEmptyElement() const _IRR_OVERRIDE_
|
||||
virtual bool isEmptyElement() const IRR_OVERRIDE
|
||||
{
|
||||
return IsEmptyElement;
|
||||
}
|
||||
|
||||
//! Returns format of the source xml file.
|
||||
virtual ETEXT_FORMAT getSourceFormat() const _IRR_OVERRIDE_
|
||||
virtual ETEXT_FORMAT getSourceFormat() const IRR_OVERRIDE
|
||||
{
|
||||
return SourceFormat;
|
||||
}
|
||||
|
||||
//! Returns format of the strings returned by the parser.
|
||||
virtual ETEXT_FORMAT getParserFormat() const _IRR_OVERRIDE_
|
||||
virtual ETEXT_FORMAT getParserFormat() const IRR_OVERRIDE
|
||||
{
|
||||
return TargetFormat;
|
||||
}
|
||||
|
Reference in New Issue
Block a user