Fixed two cppcheck messages
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index ad00867..6567520 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -1691,7 +1691,7 @@
}
-void XMLDocument::Print( XMLPrinter* streamer )
+void XMLDocument::Print( XMLPrinter* streamer ) const
{
XMLPrinter stdStreamer( stdout );
if ( !streamer ) {
@@ -1839,8 +1839,8 @@
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 ) {