From 1c5f99e37c0e7132fae4d167dcd7c746ad6ed36b Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sat, 6 Jul 2013 11:28:39 +0200 Subject: [PATCH] Fixed two cppcheck messages --- tinyxml2.cpp | 4 ++-- tinyxml2.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index ad00867..6567520 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1691,7 +1691,7 @@ XMLError XMLDocument::Parse( const char* p, size_t len ) } -void XMLDocument::Print( XMLPrinter* streamer ) +void XMLDocument::Print( XMLPrinter* streamer ) const { XMLPrinter stdStreamer( stdout ); if ( !streamer ) { @@ -1839,8 +1839,8 @@ void XMLPrinter::PrintString( const char* p, bool restricted ) void XMLPrinter::PushHeader( bool writeBOM, bool writeDec ) { - static const unsigned char bom[] = { TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, TIXML_UTF_LEAD_2, 0 }; if ( writeBOM ) { + static const unsigned char bom[] = { TIXML_UTF_LEAD_0, TIXML_UTF_LEAD_1, TIXML_UTF_LEAD_2, 0 }; Print( "%s", bom ); } if ( writeDec ) { diff --git a/tinyxml2.h b/tinyxml2.h index 2c11d13..07ddc2b 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -1511,7 +1511,7 @@ public: // printer.CStr() has a const char* to the XML @endverbatim */ - void Print( XMLPrinter* streamer=0 ); + void Print( XMLPrinter* streamer=0 ) const; virtual bool Accept( XMLVisitor* visitor ) const; /**