From ed7a7dc98564c9c250d7d7cb36c5212f7223127d Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 14 Jan 2015 08:36:12 +0300 Subject: [PATCH] Use proper constraints for int variable --- tinyxml2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinyxml2.h b/tinyxml2.h index 1f6c833..f571032 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -232,14 +232,14 @@ public: } void Push( T t ) { - TIXMLASSERT( _size < (size_t)(-1) ); + TIXMLASSERT( _size < INT_MAX ); EnsureCapacity( _size+1 ); _mem[_size++] = t; } T* PushArr( int count ) { TIXMLASSERT( count >= 0 ); - TIXMLASSERT( _size <= (size_t)(-1) - count ); + TIXMLASSERT( _size <= INT_MAX - count ); EnsureCapacity( _size+count ); T* ret = &_mem[_size]; _size += count;