Commit c3652a8e authored by Raphael Grimm's avatar Raphael Grimm

Add override to tinyxml2.h

parent b874abe3
......@@ -362,14 +362,14 @@ public:
_nUntracked = 0;
}
virtual int ItemSize() const {
int ItemSize() const override {
return ITEM_SIZE;
}
int CurrentAllocs() const {
return _currentAllocs;
}
virtual void* Alloc() {
void* Alloc() override {
if ( !_root ) {
// Need a new block.
Block* block = new Block();
......@@ -395,7 +395,7 @@ public:
return result;
}
virtual void Free( void* mem ) {
void Free( void* mem ) override {
if ( !mem ) {
return;
}
......@@ -413,7 +413,7 @@ public:
ITEM_SIZE, _nAllocs, _blockPtrs.Size() );
}
void SetTracked() {
void SetTracked() override {
--_nUntracked;
}
......@@ -983,12 +983,12 @@ class TINYXML2_LIB XMLText : public XMLNode
{
friend class XMLDocument;
public:
virtual bool Accept( XMLVisitor* visitor ) const;
bool Accept( XMLVisitor* visitor ) const override;
virtual XMLText* ToText() {
XMLText* ToText() override {
return this;
}
virtual const XMLText* ToText() const {
const XMLText* ToText() const override {
return this;
}
......@@ -1001,14 +1001,14 @@ public:
return _isCData;
}
virtual XMLNode* ShallowClone( XMLDocument* document ) const;
virtual bool ShallowEqual( const XMLNode* compare ) const;
XMLNode* ShallowClone( XMLDocument* document ) const override;
bool ShallowEqual( const XMLNode* compare ) const override;
protected:
explicit XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {}
virtual ~XMLText() {}
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override;
private:
bool _isCData;
......@@ -1023,23 +1023,23 @@ class TINYXML2_LIB XMLComment : public XMLNode
{
friend class XMLDocument;
public:
virtual XMLComment* ToComment() {
XMLComment* ToComment() override {
return this;
}
virtual const XMLComment* ToComment() const {
const XMLComment* ToComment() const override {
return this;
}
virtual bool Accept( XMLVisitor* visitor ) const;
bool Accept( XMLVisitor* visitor ) const override;
virtual XMLNode* ShallowClone( XMLDocument* document ) const;
virtual bool ShallowEqual( const XMLNode* compare ) const;
XMLNode* ShallowClone( XMLDocument* document ) const override;
bool ShallowEqual( const XMLNode* compare ) const override;
protected:
explicit XMLComment( XMLDocument* doc );
virtual ~XMLComment();
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr);
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr) override;
private:
XMLComment( const XMLComment& ); // not supported
......@@ -1062,23 +1062,23 @@ class TINYXML2_LIB XMLDeclaration : public XMLNode
{
friend class XMLDocument;
public:
virtual XMLDeclaration* ToDeclaration() {
XMLDeclaration* ToDeclaration() override {
return this;
}
virtual const XMLDeclaration* ToDeclaration() const {
const XMLDeclaration* ToDeclaration() const override {
return this;
}
virtual bool Accept( XMLVisitor* visitor ) const;
bool Accept( XMLVisitor* visitor ) const override;
virtual XMLNode* ShallowClone( XMLDocument* document ) const;
virtual bool ShallowEqual( const XMLNode* compare ) const;
XMLNode* ShallowClone( XMLDocument* document ) const override;
bool ShallowEqual( const XMLNode* compare ) const override;
protected:
explicit XMLDeclaration( XMLDocument* doc );
virtual ~XMLDeclaration();
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override;
private:
XMLDeclaration( const XMLDeclaration& ); // not supported
......@@ -1097,23 +1097,23 @@ class TINYXML2_LIB XMLUnknown : public XMLNode
{
friend class XMLDocument;
public:
virtual XMLUnknown* ToUnknown() {
XMLUnknown* ToUnknown() override {
return this;
}
virtual const XMLUnknown* ToUnknown() const {
const XMLUnknown* ToUnknown() const override {
return this;
}
virtual bool Accept( XMLVisitor* visitor ) const;
bool Accept( XMLVisitor* visitor ) const override;
virtual XMLNode* ShallowClone( XMLDocument* document ) const;
virtual bool ShallowEqual( const XMLNode* compare ) const;
XMLNode* ShallowClone( XMLDocument* document ) const override;
bool ShallowEqual( const XMLNode* compare ) const override;
protected:
explicit XMLUnknown( XMLDocument* doc );
virtual ~XMLUnknown();
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override;
private:
XMLUnknown( const XMLUnknown& ); // not supported
......@@ -1255,13 +1255,13 @@ public:
SetValue( str, staticMem );
}
virtual XMLElement* ToElement() {
XMLElement* ToElement() override {
return this;
}
virtual const XMLElement* ToElement() const {
const XMLElement* ToElement() const override{
return this;
}
virtual bool Accept( XMLVisitor* visitor ) const;
bool Accept( XMLVisitor* visitor ) const override;
/** Given an attribute name, Attribute() returns the value
for the attribute of that name, or null if none
......@@ -1611,11 +1611,11 @@ public:
ElementClosingType ClosingType() const {
return _closingType;
}
virtual XMLNode* ShallowClone( XMLDocument* document ) const;
virtual bool ShallowEqual( const XMLNode* compare ) const;
XMLNode* ShallowClone( XMLDocument* document ) const override;
bool ShallowEqual( const XMLNode* compare ) const override;
protected:
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr );
char* ParseDeep( char* p, StrPair* parentEndTag, int* curLineNumPtr ) override;
private:
XMLElement( XMLDocument* doc );
......@@ -1663,11 +1663,11 @@ public:
XMLDocument( bool processEntities = true, Whitespace whitespaceMode = PRESERVE_WHITESPACE );
~XMLDocument();
virtual XMLDocument* ToDocument() {
XMLDocument* ToDocument() override {
TIXMLASSERT( this == _document );
return this;
}
virtual const XMLDocument* ToDocument() const {
const XMLDocument* ToDocument() const override {
TIXMLASSERT( this == _document );
return this;
}
......@@ -1764,7 +1764,7 @@ public:
@endverbatim
*/
void Print( XMLPrinter* streamer=0 ) const;
virtual bool Accept( XMLVisitor* visitor ) const;
bool Accept( XMLVisitor* visitor ) const override;
/**
Create a new Element associated with
......@@ -1856,10 +1856,10 @@ public:
// internal
void MarkInUse(XMLNode*);
virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const {
XMLNode* ShallowClone( XMLDocument* /*document*/ ) const override {
return 0;
}
virtual bool ShallowEqual( const XMLNode* /*compare*/ ) const {
bool ShallowEqual( const XMLNode* /*compare*/ ) const override {
return false;
}
......@@ -2219,18 +2219,18 @@ public:
void PushDeclaration( const char* value );
void PushUnknown( const char* value );
virtual bool VisitEnter( const XMLDocument& /*doc*/ );
virtual bool VisitExit( const XMLDocument& /*doc*/ ) {
bool VisitEnter( const XMLDocument& /*doc*/ ) override;
bool VisitExit( const XMLDocument& /*doc*/ ) override {
return true;
}
virtual bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute );
virtual bool VisitExit( const XMLElement& element );
bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute ) override;
bool VisitExit( const XMLElement& element ) override;
virtual bool Visit( const XMLText& text );
virtual bool Visit( const XMLComment& comment );
virtual bool Visit( const XMLDeclaration& declaration );
virtual bool Visit( const XMLUnknown& unknown );
bool Visit( const XMLText& text ) override;
bool Visit( const XMLComment& comment ) override;
bool Visit( const XMLDeclaration& declaration ) override;
bool Visit( const XMLUnknown& unknown ) override;
/**
If in print to memory mode, return a pointer to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment