mirror of https://github.com/AxioDL/tinyxml2.git
Merge pull request #632 from alabuzhev/size_t_to_int_warning
Suppress MSVC warning C4267: conversion from 'size_t' to 'int', possible loss of data
This commit is contained in:
commit
2ab76dab6d
|
@ -2418,7 +2418,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( size ) - 1; // back up over the null terminator.
|
char* p = _buffer.PushArr( static_cast<int>(size) ) - 1; // back up over the null terminator.
|
||||||
memcpy( p, data, size );
|
memcpy( p, data, size );
|
||||||
p[size] = 0;
|
p[size] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue