mirror of https://github.com/AxioDL/tinyxml2.git
Merge pull request #610 from Dmitry-Me/reuseConversionCode
Extract and reuse conversion code
This commit is contained in:
commit
b0c421d9a7
|
@ -2380,8 +2380,9 @@ XMLPrinter::XMLPrinter( FILE* file, bool compact, int depth ) :
|
||||||
}
|
}
|
||||||
for( int i=0; i<NUM_ENTITIES; ++i ) {
|
for( int i=0; i<NUM_ENTITIES; ++i ) {
|
||||||
const char entityValue = entities[i].value;
|
const char entityValue = entities[i].value;
|
||||||
TIXMLASSERT( ((unsigned char)entityValue) < ENTITY_RANGE );
|
const unsigned char flagIndex = (unsigned char)entityValue;
|
||||||
_entityFlag[ (unsigned char)entityValue ] = true;
|
TIXMLASSERT( flagIndex < ENTITY_RANGE );
|
||||||
|
_entityFlag[flagIndex] = true;
|
||||||
}
|
}
|
||||||
_restrictedEntityFlag[(unsigned char)'&'] = true;
|
_restrictedEntityFlag[(unsigned char)'&'] = true;
|
||||||
_restrictedEntityFlag[(unsigned char)'<'] = true;
|
_restrictedEntityFlag[(unsigned char)'<'] = true;
|
||||||
|
|
Loading…
Reference in New Issue