Browse Source

fix compiler warning

Lee Thomason 11 years ago
parent
commit
ebb0c8f904
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tinyxml2.cpp

+ 2 - 0
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