瀏覽代碼

fix compiler warning

Lee Thomason 11 年之前
父節點
當前提交
ebb0c8f904
共有 1 個文件被更改,包括 2 次插入0 次删除
  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