Merge pull request #360 from Dmitry-Me/documentConsistencyAsserts

Document consistency asserts
This commit is contained in:
Lee Thomason 2015-07-21 16:20:12 -07:00
commit eb89ef6f0d
1 changed files with 4 additions and 0 deletions

View File

@ -630,10 +630,12 @@ public:
/// Get the XMLDocument that owns this XMLNode.
const XMLDocument* GetDocument() const {
TIXMLASSERT( _document );
return _document;
}
/// Get the XMLDocument that owns this XMLNode.
XMLDocument* GetDocument() {
TIXMLASSERT( _document );
return _document;
}
@ -1536,9 +1538,11 @@ public:
~XMLDocument();
virtual XMLDocument* ToDocument() {
TIXMLASSERT( this == _document );
return this;
}
virtual const XMLDocument* ToDocument() const {
TIXMLASSERT( this == _document );
return this;
}