mirror of https://github.com/AxioDL/tinyxml2.git
Split access and pointer adjustment
This commit is contained in:
parent
584af57086
commit
fed511276f
|
@ -281,7 +281,8 @@ const char* StrPair::GetStr()
|
|||
else {
|
||||
++p;
|
||||
}
|
||||
*q++ = LF;
|
||||
*q = LF;
|
||||
++q;
|
||||
}
|
||||
else if ( (_flags & NEEDS_NEWLINE_NORMALIZATION) && *p == LF ) {
|
||||
if ( *(p+1) == CR ) {
|
||||
|
@ -290,7 +291,8 @@ const char* StrPair::GetStr()
|
|||
else {
|
||||
++p;
|
||||
}
|
||||
*q++ = LF;
|
||||
*q = LF;
|
||||
++q;
|
||||
}
|
||||
else if ( (_flags & NEEDS_ENTITY_PROCESSING) && *p == '&' ) {
|
||||
// Entities handled by tinyXML2:
|
||||
|
|
|
@ -211,7 +211,8 @@ public:
|
|||
void Push( T t ) {
|
||||
TIXMLASSERT( _size < INT_MAX );
|
||||
EnsureCapacity( _size+1 );
|
||||
_mem[_size++] = t;
|
||||
_mem[_size] = t;
|
||||
++_size;
|
||||
}
|
||||
|
||||
T* PushArr( int count ) {
|
||||
|
@ -225,7 +226,8 @@ public:
|
|||
|
||||
T Pop() {
|
||||
TIXMLASSERT( _size > 0 );
|
||||
return _mem[--_size];
|
||||
--_size;
|
||||
return _mem[_size];
|
||||
}
|
||||
|
||||
void PopArr( int count ) {
|
||||
|
|
Loading…
Reference in New Issue