mirror of https://github.com/AxioDL/tinyxml2.git
Merge pull request #319 from Dmitry-Me/getRidOfNull
Get rid of NULL, cleanup formatting
This commit is contained in:
commit
e3932d6b7f
|
@ -2304,11 +2304,11 @@ bool XMLPrinter::VisitEnter( const XMLDocument& doc )
|
||||||
|
|
||||||
bool XMLPrinter::VisitEnter( const XMLElement& element, const XMLAttribute* attribute )
|
bool XMLPrinter::VisitEnter( const XMLElement& element, const XMLAttribute* attribute )
|
||||||
{
|
{
|
||||||
const XMLElement* parentElem = NULL;
|
const XMLElement* parentElem = 0;
|
||||||
if ( element.Parent() ) {
|
if ( element.Parent() ) {
|
||||||
parentElem = element.Parent()->ToElement();
|
parentElem = element.Parent()->ToElement();
|
||||||
}
|
}
|
||||||
bool compactMode = parentElem ? CompactMode(*parentElem) : _compactMode;
|
const bool compactMode = parentElem ? CompactMode( *parentElem ) : _compactMode;
|
||||||
OpenElement( element.Name(), compactMode );
|
OpenElement( element.Name(), compactMode );
|
||||||
while ( attribute ) {
|
while ( attribute ) {
|
||||||
PushAttribute( attribute->Name(), attribute->Value() );
|
PushAttribute( attribute->Name(), attribute->Value() );
|
||||||
|
|
Loading…
Reference in New Issue