From 7d7a9a37bd737082985b7a0f155315085a6b7403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Ro=DF?= Date: Thu, 10 May 2012 00:23:19 +0200 Subject: [PATCH] fixed VS2010 x64 compiler warnings about possible loss of data --- tinyxml2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 297c966..793a99f 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -120,7 +120,7 @@ char* StrPair::ParseText( char* p, const char* endTag, int strFlags ) char* start = p; // fixme: hides a member char endChar = *endTag; - int length = strlen( endTag ); + size_t length = strlen( endTag ); // Inner loop of text parsing. while ( *p ) { @@ -316,7 +316,7 @@ const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length ) if ( *(p+1) == '#' && *(p+2) ) { unsigned long ucs = 0; - int delta = 0; + ptrdiff_t delta = 0; unsigned mult = 1; if ( *(p+2) == 'x' ) @@ -329,7 +329,7 @@ const char* XMLUtil::GetCharacterRef( const char* p, char* value, int* length ) if ( !q || !*q ) return 0; - delta = (q-p); + delta = q-p; --q; while ( *q != 'x' )