medfall

A super great game engine
Log | Files | Refs

commit 6262536eb1dd3d9c4d51a370bee2c30d2e1eb421
parent 116f2b84461f82d0943f165d2c9153dd65a5b526
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Wed Aug 30 18:03:49 +0100

Allow NULL arrays if they have length 0 too

Diffstat:
array.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/array.h b/array.h @@ -14,7 +14,7 @@ public: } array( T * memory, size_t count ) { - ASSERT( memory != NULL ); + ASSERT( count == 0 || memory != NULL ); n = count; elems = memory; } @@ -109,7 +109,7 @@ public: } array2d( T * memory, size_t width, size_t height ) { - ASSERT( memory != NULL ); + ASSERT( width * height == 0 || memory != NULL ); w = width; h = height; elems = memory;