From 04c22d250a47646756e3cf94944b8de8a1c92426 Mon Sep 17 00:00:00 2001 From: Kevin Wojniak Date: Thu, 8 Nov 2012 11:02:22 -0800 Subject: [PATCH] Enclose code in namespace instead of 'using namespace' to resolve conflict on Windows with MSXML. Fixes issue #37. --- tinyxml2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 1bf4fda..2fd52a5 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -30,7 +30,6 @@ distribution. # include #endif -using namespace tinyxml2; using namespace std; static const char LINE_FEED = (char)0x0a; // all line endings are normalized to LF @@ -64,6 +63,9 @@ static const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; } \ } +namespace tinyxml2 +{ + struct Entity { const char* pattern; int length; @@ -2084,3 +2086,5 @@ bool XMLPrinter::Visit( const XMLUnknown& unknown ) PushUnknown( unknown.Value() ); return true; } + +}