Suppress MSVC warning C4267: conversion from 'size_t' to 'int', possible loss of data

This commit is contained in:
Alex Alabuzhev 2017-11-09 00:32:19 +00:00
parent 4155ac0c73
commit 90e69c95ef
No known key found for this signature in database
GPG Key ID: 9B7D4A226C3CC3EE
1 changed files with 1 additions and 1 deletions

View File

@ -2418,7 +2418,7 @@ void XMLPrinter::Write( const char* data, size_t size )
fwrite ( data , sizeof(char), size, _fp);
}
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 );
p[size] = 0;
}