Minor fix for CD_TYPE_AS_MASK macro: shift operator uses the left
authorNicholas Bishop <nicholasbishop@gmail.com>
Fri, 27 Jan 2012 08:15:30 +0000 (08:15 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Fri, 27 Jan 2012 08:15:30 +0000 (08:15 +0000)
operand's type for the result, so cast 1 to CustomDataMask.

source/blender/blenkernel/BKE_customdata.h

index 1af2f014ef47ab4fe0f105ad7df53d752deee0b7..7ad25ac7e7974352dc5ddf77e24912d7f7fac3b6 100644 (file)
@@ -67,7 +67,7 @@ extern const CustomDataMask CD_MASK_FACECORNERS;
 #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