MCPcopy Create free account
hub / github.com/avast/retdec / CloseElement

Method CloseElement

deps/tinyxml2/tinyxml2.cpp:2711–2736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2709
2710
2711void XMLPrinter::CloseElement( bool compactMode )
2712{
2713 --_depth;
2714 const char* name = _stack.Pop();
2715
2716 if ( _elementJustOpened ) {
2717 Write( "/>" );
2718 }
2719 else {
2720 if ( _textDepth < 0 && !compactMode) {
2721 Putc( '\n' );
2722 PrintSpace( _depth );
2723 }
2724 Write ( "</" );
2725 Write ( name );
2726 Write ( ">" );
2727 }
2728
2729 if ( _textDepth == _depth ) {
2730 _textDepth = -1;
2731 }
2732 if ( _depth == 0 && !compactMode) {
2733 Putc( '\n' );
2734 }
2735 _elementJustOpened = false;
2736}
2737
2738
2739void XMLPrinter::SealElementIfJustOpened()

Callers

nothing calls this directly

Calls 2

WriteFunction · 0.85
PopMethod · 0.45

Tested by

no test coverage detected