commit cd5d96e3e9bf7f9dec3362eca6003101589788d6 parent 09a5ba60cedbb8e5c1438565904f0248c28c3238 Author: Michael Savage <mikejsavage@gmail.com> Date: Fri Oct 14 20:46:40 +0300 Forgot memory_arena.h Diffstat:
memory_arena.h | | | 4 | +++- |
diff --git a/memory_arena.h b/memory_arena.h @@ -32,7 +32,9 @@ u8 * memarena_push_size( MemoryArena * const arena, const size_t size, const upt #define memarena_push_many( arena, type, count, ... ) ( ( type * ) memarena_push_size( arena, sizeof( type ) * count, ##__VA_ARGS__ ) ) #define memarena_push_array( arena, type, count, ... ) \ - array< type >( ( ( type * ) memarena_push_size( arena, sizeof( type ) * count, ##__VA_ARGS__ ) ), sizeof( type ) * count ) + array< type >( ( ( type * ) memarena_push_size( arena, sizeof( type ) * count, ##__VA_ARGS__ ) ), count ) +#define memarena_push_array2d( arena, type, width, height, ... ) \ + array2d< type >( ( ( type * ) memarena_push_size( arena, sizeof( type ) * width * height, ##__VA_ARGS__ ) ), width, height ) MemoryArena memarena_push_arena( MemoryArena * const arena, const size_t size );