Using static_cast instead of C-style cast in MEM_DEFINE_LOCAL_ARRAY.

This commit is contained in:
Ruben Ayrapetyan 2015-01-27 15:40:46 +03:00
parent 57f645c18c
commit d1925ab882

View File

@ -89,7 +89,7 @@ extern void mem_heap_stats_reset_peak (void);
#define MEM_DEFINE_LOCAL_ARRAY(var_name, number, type) \
{ \
size_t var_name ## ___size = (size_t) (number) * sizeof (type); \
type *var_name = (type *) mem_heap_alloc_block (var_name ## ___size, MEM_HEAP_ALLOC_SHORT_TERM);
type *var_name = static_cast <type *> (mem_heap_alloc_block (var_name ## ___size, MEM_HEAP_ALLOC_SHORT_TERM));
/**
* Free the previously defined local array variable, freeing corresponding block on the heap,