mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-21 19:23:00 +04:00
Fix issue 1000 (#1040)
* fix compilation warnings produced by -Wold-style-cast * remove incorrect cast
This commit is contained in:
+1
-1
@@ -2656,7 +2656,7 @@ void XMLPrinter::Write( const char* data, size_t size )
|
|||||||
fwrite ( data , sizeof(char), size, _fp);
|
fwrite ( data , sizeof(char), size, _fp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char* p = _buffer.PushArr( static_cast<int>(size) ) - 1; // back up over the null terminator.
|
char* p = _buffer.PushArr( size ) - 1; // back up over the null terminator.
|
||||||
memcpy( p, data, size );
|
memcpy( p, data, size );
|
||||||
p[size] = 0;
|
p[size] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user