[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43740] trunk/blender/source/blender/ blenkernel/BKE_customdata.h: Minor fix for CD_TYPE_AS_MASK macro: shift operator uses the left

Nicholas Bishop nicholasbishop at gmail.com
Fri Jan 27 09:15:37 CET 2012


Revision: 43740
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43740
Author:   nicholasbishop
Date:     2012-01-27 08:15:30 +0000 (Fri, 27 Jan 2012)
Log Message:
-----------
Minor fix for CD_TYPE_AS_MASK macro: shift operator uses the left
operand's type for the result, so cast 1 to CustomDataMask.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_customdata.h

Modified: trunk/blender/source/blender/blenkernel/BKE_customdata.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_customdata.h	2012-01-27 08:04:03 UTC (rev 43739)
+++ trunk/blender/source/blender/blenkernel/BKE_customdata.h	2012-01-27 08:15:30 UTC (rev 43740)
@@ -67,7 +67,7 @@
 #define CD_DUPLICATE 4  /* do a full copy of all layers, only allowed if source
 						   has same number of elements */
 
-#define CD_TYPE_AS_MASK(_type) (CustomDataMask)(1 << (CustomDataMask)(_type))
+#define CD_TYPE_AS_MASK(_type) (CustomDataMask)((CustomDataMask)1 << (CustomDataMask)(_type))
 
 /* initialises a CustomData object with the same layer setup as source.
  * mask is a bitfield where (mask & (1 << (layer type))) indicates



More information about the Bf-blender-cvs mailing list