mirror of https://github.com/AxioDL/tinyxml2.git
Suppress MSVC warning C4267: conversion from 'size_t' to 'int', possible loss of data
This commit is contained in:
parent
4155ac0c73
commit
90e69c95ef
|
@ -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