Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-07 11:27:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-07 11:27:09 +0400
commit1a9f930514719eee65609d7499bd184147580b55 (patch)
tree27cb3effcebd61ae3dc12fd7cdc16ab9d30dc803 /source/blender/blenlib/BLI_utildefines.h
parent89a415a49d0e96bd6bf63b5e6e9d5bfe2f87bc49 (diff)
add type checking for more error prone macros.
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h4
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; \