correct assert for customdata overlap, also quiet `uninitialized` warning in transform.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2012 08:17:53 +0000 (08:17 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 24 Aug 2012 08:17:53 +0000 (08:17 +0000)
source/blender/blenkernel/intern/customdata.c
source/blender/editors/transform/transform.c

index c55f1b551e2459093f73781a5afdc8a6d66795fa..36c571a53ceaf5c2dc31481342a87a60cba8d5e4 100644 (file)
@@ -2018,7 +2018,7 @@ void CustomData_interp(const CustomData *source, CustomData *dest,
 
                        for (j = 0; j < count; ++j) {
                                /* if this happens we need to do a temp copy, see: USE_INTERP_OVERLAP_FIX */
-                               BLI_assert(dest_index != src_indices[j]);
+                               BLI_assert(((source == dest) && (dest_index == src_indices[j])) == FALSE);
 
                                sources[j] = (char *)src_data + typeInfo->size * src_indices[j];
                        }
index 284c670fa082ee6a7e63c47b7cb7d50e19acd3ab..8259ca64badc8386a8c33835e1c2cf7bf8472cb7 100644 (file)
@@ -208,6 +208,11 @@ void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy)
                        /* TODO - NOT WORKING, this isnt so bad since its only display aspect */
                        ED_space_clip_get_aspect(t->sa->spacedata.first, &aspx, &aspy);
                }
+               else {
+                       /* should never happen, quiet warnings */
+                       BLI_assert(0);
+                       aspx = aspy = 1.0f;
+               }
 
                r_vec[0] *= aspx;
                r_vec[1] *= aspy;