[Bf-blender-cvs] [5806d7ef543] master: Cleanup: avoid ambiguous parenthesis

Campbell Barton noreply at git.blender.org
Fri Apr 30 08:18:14 CEST 2021


Commit: 5806d7ef5432e9e46ab90050de91a071b1371a9b
Author: Campbell Barton
Date:   Fri Apr 30 15:24:24 2021 +1000
Branches: master
https://developer.blender.org/rB5806d7ef5432e9e46ab90050de91a071b1371a9b

Cleanup: avoid ambiguous parenthesis

===================================================================

M	source/blender/blenkernel/intern/pointcache.c
M	source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c

===================================================================

diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 17434ee8023..be206f8a642 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1805,7 +1805,7 @@ int BKE_ptcache_mem_pointers_seek(int point_index, PTCacheMem *pm, void *cur[BPH
   }
 
   for (i = 0; i < BPHYS_TOT_DATA; i++) {
-    cur[i] = data_types & (1 << i) ? (char *)pm->data[i] + index * ptcache_data_size[i] : NULL;
+    cur[i] = (data_types & (1 << i)) ? (char *)pm->data[i] + index * ptcache_data_size[i] : NULL;
   }
 
   return 1;
diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
index ee344561b0e..e2f3c352676 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
@@ -614,8 +614,8 @@ static void snap_gizmo_draw(const bContext *C, wmGizmo *gz)
 
   GPU_line_width(1.0f);
 
-  const float *prev_point = snap_gizmo_snap_elements(snap_gizmo) &
-                                    SCE_SNAP_MODE_EDGE_PERPENDICULAR ?
+  const float *prev_point = (snap_gizmo_snap_elements(snap_gizmo) &
+                             SCE_SNAP_MODE_EDGE_PERPENDICULAR) ?
                                 snap_gizmo->prevpoint :
                                 NULL;



More information about the Bf-blender-cvs mailing list