diff options
author | Chris Robinson <[email protected]> | 2015-09-15 19:23:32 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2015-09-15 19:23:32 -0700 |
commit | 3c728657758e59ecb2c488580bf61b91bb1a1449 (patch) | |
tree | 3a4ed6a22dd0f3ed7ca9dfc677a63e49ec9165ae /OpenAL32 | |
parent | b348abf5c31f58e8de62f0b33b7b110f6448d035 (diff) |
Use sizeof T for the size of the object type
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index bdc854fc..4c91336d 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -418,12 +418,12 @@ static void T##_Delete(void *ptr) { al_free(ptr); } } \ } while(0) -#define NEW_OBJ(_ptr, T) do { \ - _ptr = T##_New(sizeof(*_ptr)); \ - if(_ptr) \ +#define NEW_OBJ(_res, T) do { \ + _res = T##_New(sizeof(T)); \ + if(_res) \ { \ - memset(_ptr, 0, sizeof(*_ptr)); \ - T##_Construct(_ptr, EXTRACT_NEW_ARGS + memset(_res, 0, sizeof(T)); \ + T##_Construct(_res, EXTRACT_NEW_ARGS #ifdef __cplusplus |