From ebb0c8f904521bb82ec29e92e1191a4a5708032c Mon Sep 17 00:00:00 2001 From: Lee Thomason Date: Wed, 17 Dec 2014 10:50:32 -0800 Subject: [PATCH] fix compiler warning --- tinyxml2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 0289a13..2d3a1f7 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1967,6 +1967,8 @@ XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) : _entityFlag[ (int)entities[i].value ] = true; } } + // Clang doesn't like indexing arrays with 'char' + // so cast to int. (Looks strange.) _restrictedEntityFlag[(int)'&'] = true; _restrictedEntityFlag[(int)'<'] = true; _restrictedEntityFlag[(int)'>'] = true; // not required, but consistency is nice