[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59197] trunk/blender/source/blender: change CHECK_TYPE_INLINE macro not to add the pointer in the macro.

Campbell Barton ideasman42 at gmail.com
Sat Aug 17 06:48:38 CEST 2013


Revision: 59197
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59197
Author:   campbellbarton
Date:     2013-08-17 04:48:34 +0000 (Sat, 17 Aug 2013)
Log Message:
-----------
change CHECK_TYPE_INLINE macro not to add the pointer in the macro.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_armature.h
    trunk/blender/source/blender/blenlib/BLI_utildefines.h
    trunk/blender/source/blender/blenlib/intern/smallhash.c
    trunk/blender/source/blender/bmesh/intern/bmesh_edgeloop.h
    trunk/blender/source/blender/editors/include/ED_anim_api.h
    trunk/blender/source/blender/editors/include/ED_armature.h
    trunk/blender/source/blender/makesdna/DNA_ID.h

Modified: trunk/blender/source/blender/blenkernel/BKE_armature.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_armature.h	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/blenkernel/BKE_armature.h	2013-08-17 04:48:34 UTC (rev 59197)
@@ -132,8 +132,8 @@
 
 /* like EBONE_VISIBLE */
 #define PBONE_VISIBLE(arm, bone) ( \
-	CHECK_TYPE_INLINE(arm, bArmature), \
-	CHECK_TYPE_INLINE(bone, Bone), \
+	CHECK_TYPE_INLINE(arm, bArmature *), \
+	CHECK_TYPE_INLINE(bone, Bone *), \
 	(((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P)) \
 	)
 

Modified: trunk/blender/source/blender/blenlib/BLI_utildefines.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_utildefines.h	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/blenlib/BLI_utildefines.h	2013-08-17 04:48:34 UTC (rev 59197)
@@ -113,7 +113,7 @@
 
 /* can be used in simple macros */
 #define CHECK_TYPE_INLINE(val, type) \
-	((void)(((type *)0) != (val)))
+	((void)(((type)0) != (val)))
 
 #define SWAP(type, a, b)  {    \
 	type sw_ap;                \

Modified: trunk/blender/source/blender/blenlib/intern/smallhash.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/smallhash.c	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/blenlib/intern/smallhash.c	2013-08-17 04:48:34 UTC (rev 59197)
@@ -53,8 +53,8 @@
 
 /* typically this re-assigns 'h' */
 #define SMHASH_NEXT(h, hoff)  ( \
-	CHECK_TYPE_INLINE(&(h),    unsigned int), \
-	CHECK_TYPE_INLINE(&(hoff), unsigned int), \
+	CHECK_TYPE_INLINE(&(h),    unsigned int *), \
+	CHECK_TYPE_INLINE(&(hoff), unsigned int *), \
 	((h) + (((hoff) = ((hoff) * 2) + 1), (hoff))) \
 	)
 

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_edgeloop.h
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_edgeloop.h	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_edgeloop.h	2013-08-17 04:48:34 UTC (rev 59197)
@@ -70,7 +70,7 @@
 	(elink)->next ? elink->next : (BM_edgeloop_is_closed(el_store) ? BM_edgeloop_verts_get(el_store)->first : NULL)
 
 #define BM_EDGELOOP_NEXT(el_store) \
-	(CHECK_TYPE_INLINE(el_store, struct BMEdgeLoopStore), \
+	(CHECK_TYPE_INLINE(el_store, struct BMEdgeLoopStore *), \
 	 (struct BMEdgeLoopStore *)((LinkData *)el_store)->next)
 
 #endif  /* __BMESH_EDGELOOP_H__ */

Modified: trunk/blender/source/blender/editors/include/ED_anim_api.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_anim_api.h	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/editors/include/ED_anim_api.h	2013-08-17 04:48:34 UTC (rev 59197)
@@ -233,29 +233,29 @@
 
 /* Dopesheet only */
 /* 'Scene' channels */
-#define SEL_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene), ((sce->flag & SCE_DS_SELECTED)))
-#define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene), ((sce->flag & SCE_DS_COLLAPSED) == 0))
+#define SEL_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_SELECTED)))
+#define EXPANDED_SCEC(sce) (CHECK_TYPE_INLINE(sce, Scene *), ((sce->flag & SCE_DS_COLLAPSED) == 0))
 /* 'Sub-Scene' channels (flags stored in Data block) */
-#define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World), (wo->flag & WO_DS_EXPAND))
+#define FILTER_WOR_SCED(wo) (CHECK_TYPE_INLINE(wo, World *), (wo->flag & WO_DS_EXPAND))
 #define FILTER_LS_SCED(linestyle) ((linestyle->flag & LS_DS_EXPAND))
 /* 'Object' channels */
-#define SEL_OBJC(base)          (CHECK_TYPE_INLINE(base, Base), ((base->flag & SELECT)))
-#define EXPANDED_OBJC(ob)       (CHECK_TYPE_INLINE(ob, Object), ((ob->nlaflag & OB_ADS_COLLAPSED) == 0))
+#define SEL_OBJC(base)          (CHECK_TYPE_INLINE(base, Base *), ((base->flag & SELECT)))
+#define EXPANDED_OBJC(ob)       (CHECK_TYPE_INLINE(ob, Object *), ((ob->nlaflag & OB_ADS_COLLAPSED) == 0))
 /* 'Sub-object' channels (flags stored in Data block) */
-#define FILTER_SKE_OBJD(key)    (CHECK_TYPE_INLINE(key, Key), ((key->flag & KEY_DS_EXPAND)))
-#define FILTER_MAT_OBJD(ma)     (CHECK_TYPE_INLINE(ma, Material), ((ma->flag & MA_DS_EXPAND)))
-#define FILTER_LAM_OBJD(la)     (CHECK_TYPE_INLINE(la, Lamp), ((la->flag & LA_DS_EXPAND)))
-#define FILTER_CAM_OBJD(ca)     (CHECK_TYPE_INLINE(ca, Camera), ((ca->flag & CAM_DS_EXPAND)))
-#define FILTER_CUR_OBJD(cu)     (CHECK_TYPE_INLINE(cu, Curve), ((cu->flag & CU_DS_EXPAND)))
-#define FILTER_PART_OBJD(part)  (CHECK_TYPE_INLINE(part, ParticleSettings), ((part->flag & PART_DS_EXPAND)))
-#define FILTER_MBALL_OBJD(mb)   (CHECK_TYPE_INLINE(mb, MetaBall), ((mb->flag2 & MB_DS_EXPAND)))
-#define FILTER_ARM_OBJD(arm)    (CHECK_TYPE_INLINE(arm, bArmature), ((arm->flag & ARM_DS_EXPAND)))
-#define FILTER_MESH_OBJD(me)    (CHECK_TYPE_INLINE(me, Mesh), ((me->flag & ME_DS_EXPAND)))
-#define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice), ((lt->flag & LT_DS_EXPAND)))
-#define FILTER_SPK_OBJD(spk)    (CHECK_TYPE_INLINE(spk, Speaker), ((spk->flag & SPK_DS_EXPAND)))
+#define FILTER_SKE_OBJD(key)    (CHECK_TYPE_INLINE(key, Key *), ((key->flag & KEY_DS_EXPAND)))
+#define FILTER_MAT_OBJD(ma)     (CHECK_TYPE_INLINE(ma, Material *), ((ma->flag & MA_DS_EXPAND)))
+#define FILTER_LAM_OBJD(la)     (CHECK_TYPE_INLINE(la, Lamp *), ((la->flag & LA_DS_EXPAND)))
+#define FILTER_CAM_OBJD(ca)     (CHECK_TYPE_INLINE(ca, Camera *), ((ca->flag & CAM_DS_EXPAND)))
+#define FILTER_CUR_OBJD(cu)     (CHECK_TYPE_INLINE(cu, Curve *), ((cu->flag & CU_DS_EXPAND)))
+#define FILTER_PART_OBJD(part)  (CHECK_TYPE_INLINE(part, ParticleSettings *), ((part->flag & PART_DS_EXPAND)))
+#define FILTER_MBALL_OBJD(mb)   (CHECK_TYPE_INLINE(mb, MetaBall *), ((mb->flag2 & MB_DS_EXPAND)))
+#define FILTER_ARM_OBJD(arm)    (CHECK_TYPE_INLINE(arm, bArmature *), ((arm->flag & ARM_DS_EXPAND)))
+#define FILTER_MESH_OBJD(me)    (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND)))
+#define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice *), ((lt->flag & LT_DS_EXPAND)))
+#define FILTER_SPK_OBJD(spk)    (CHECK_TYPE_INLINE(spk, Speaker *), ((spk->flag & SPK_DS_EXPAND)))
 /* Variable use expanders */
-#define FILTER_NTREE_DATA(ntree) (CHECK_TYPE_INLINE(ntree, bNodeTree), ((ntree->flag & NTREE_DS_EXPAND)))
-#define FILTER_TEX_DATA(tex)     (CHECK_TYPE_INLINE(tex, Tex), ((tex->flag & TEX_DS_EXPAND)))
+#define FILTER_NTREE_DATA(ntree) (CHECK_TYPE_INLINE(ntree, bNodeTree *), ((ntree->flag & NTREE_DS_EXPAND)))
+#define FILTER_TEX_DATA(tex)     (CHECK_TYPE_INLINE(tex, Tex *), ((tex->flag & TEX_DS_EXPAND)))
 
 /* 'Sub-object/Action' channels (flags stored in Action) */
 #define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))

Modified: trunk/blender/source/blender/editors/include/ED_armature.h
===================================================================
--- trunk/blender/source/blender/editors/include/ED_armature.h	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/editors/include/ED_armature.h	2013-08-17 04:48:34 UTC (rev 59197)
@@ -94,15 +94,15 @@
 
 /* useful macros */
 #define EBONE_VISIBLE(arm, ebone) ( \
-	CHECK_TYPE_INLINE(arm, bArmature), \
-	CHECK_TYPE_INLINE(ebone, EditBone), \
+	CHECK_TYPE_INLINE(arm, bArmature *), \
+	CHECK_TYPE_INLINE(ebone, EditBone *), \
 	(((arm)->layer & (ebone)->layer) && !((ebone)->flag & BONE_HIDDEN_A)) \
 	)
 
 #define EBONE_SELECTABLE(arm, ebone) (EBONE_VISIBLE(arm, ebone) && !(ebone->flag & BONE_UNSELECTABLE))
 
 #define EBONE_EDITABLE(ebone) ( \
-	CHECK_TYPE_INLINE(ebone, EditBone), \
+	CHECK_TYPE_INLINE(ebone, EditBone *), \
 	(((ebone)->flag & BONE_SELECTED) && !((ebone)->flag & BONE_EDITMODE_LOCKED)) \
 	)
 

Modified: trunk/blender/source/blender/makesdna/DNA_ID.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_ID.h	2013-08-17 04:37:25 UTC (rev 59196)
+++ trunk/blender/source/blender/makesdna/DNA_ID.h	2013-08-17 04:48:34 UTC (rev 59197)
@@ -235,7 +235,7 @@
 #  undef GS
 #endif
 // #define GS(a)	(*((short *)(a)))
-#define GS(a)	(CHECK_TYPE_INLINE(a, const char), (*((short *)(a))))
+#define GS(a)	(CHECK_TYPE_INLINE(a, const char *), (*((short *)(a))))
 
 #define ID_NEW(a)		if (      (a) && (a)->id.newid ) (a) = (void *)(a)->id.newid
 #define ID_NEW_US(a)	if (      (a)->id.newid)       { (a) = (void *)(a)->id.newid;       (a)->id.us++; }




More information about the Bf-blender-cvs mailing list