fix compiler warning

This commit is contained in:
Lee Thomason 2014-12-17 10:50:32 -08:00
parent 7334f9efab
commit ebb0c8f904
1 changed files with 2 additions and 0 deletions

View File

@ -1967,6 +1967,8 @@ XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
_entityFlag[ (int)entities[i].value ] = true; _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; _restrictedEntityFlag[(int)'<'] = true;
_restrictedEntityFlag[(int)'>'] = true; // not required, but consistency is nice _restrictedEntityFlag[(int)'>'] = true; // not required, but consistency is nice