From 90e69c95ef73e969f37e914cca7e82a3544da4d4 Mon Sep 17 00:00:00 2001 From: Alex Alabuzhev Date: Thu, 9 Nov 2017 00:32:19 +0000 Subject: [PATCH] Suppress MSVC warning C4267: conversion from 'size_t' to 'int', possible loss of data --- tinyxml2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index d147ffe..04cf697 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -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(size) ) - 1; // back up over the null terminator. memcpy( p, data, size ); p[size] = 0; }