소스 검색

Fix issue 1000 (#1040)

* fix compilation warnings produced by -Wold-style-cast

* remove incorrect cast
LuridHound 3 달 전
부모
커밋
c4e29afeaf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tinyxml2.cpp

+ 1 - 1
tinyxml2.cpp

@@ -2656,7 +2656,7 @@ void XMLPrinter::Write( const char* data, size_t size )
         fwrite ( data , sizeof(char), size, _fp);
     }
     else {
-        char* p = _buffer.PushArr( static_cast<int>(size) ) - 1;   // back up over the null terminator.
+        char* p = _buffer.PushArr( size ) - 1;   // back up over the null terminator.
         memcpy( p, data, size );
         p[size] = 0;
     }