diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-07 11:27:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-07 11:27:09 +0400 |
commit | 1a9f930514719eee65609d7499bd184147580b55 (patch) | |
tree | 27cb3effcebd61ae3dc12fd7cdc16ab9d30dc803 /source/blender/blenlib | |
parent | 89a415a49d0e96bd6bf63b5e6e9d5bfe2f87bc49 (diff) |
add type checking for more error prone macros.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_utildefines.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 29097a4c6c3..ebb40c18c21 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -128,6 +128,10 @@ #endif #endif +/* can be used in simple macros */ +#define CHECK_TYPE_INLINE(val, type) \ + ((void)(((type *)0) == (val))) + #ifndef SWAP # define SWAP(type, a, b) { \ type sw_ap; \ |