Explorar el Código

Consistency asserts

Dmitry-Me hace 10 años
padre
commit
2f5a103992
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      tinyxml2.h

+ 3 - 0
tinyxml2.h

@@ -281,14 +281,17 @@ public:
     }
 
     int Capacity() const				{
+        TIXMLASSERT( _allocated >= INITIAL_SIZE );
         return _allocated;
     }
 
     const T* Mem() const				{
+        TIXMLASSERT( _mem );
         return _mem;
     }
 
     T* Mem()							{
+        TIXMLASSERT( _mem );
         return _mem;
     }