Sfoglia il codice sorgente

Merge pull request #308 from Dmitry-Me/mergePrintCalls

Merge Print() calls
Lee Thomason 11 anni fa
parent
commit
51b33321be
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1 3
      tinyxml2.cpp

+ 1 - 3
tinyxml2.cpp

@@ -2206,9 +2206,7 @@ void XMLPrinter::PushText( const char* text, bool cdata )
 
     SealElementIfJustOpened();
     if ( cdata ) {
-        Print( "<![CDATA[" );
-        Print( "%s", text );
-        Print( "]]>" );
+        Print( "<![CDATA[%s]]>", text );
     }
     else {
         PrintString( text, true );