[Bf-blender-cvs] [79e82dbc057] master: cleanup: Fix style issue in sculpt.c

Ray Molenkamp noreply at git.blender.org
Fri Aug 28 18:04:31 CEST 2020


Commit: 79e82dbc0574abe97f7316dc23441472594a3f57
Author: Ray Molenkamp
Date:   Fri Aug 28 10:03:52 2020 -0600
Branches: master
https://developer.blender.org/rB79e82dbc0574abe97f7316dc23441472594a3f57

cleanup: Fix style issue in sculpt.c

At first sight this code should not build at all
but due to the use of macro's that look like functions
this seemingly has no issues building.

Clang-format alerted me to this strange bit of code
by placing the `if` on it's own line for some reason.

added the missing brackets, and clang-format is happy
again.

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

M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f8cd7dfe262..7a066f35f23 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6634,12 +6634,12 @@ static float sculpt_brush_dynamic_size_get(Brush *brush, StrokeCache *cache, flo
  * generally used to create grab deformations. */
 static bool sculpt_needs_delta_from_anchored_origin(Brush *brush)
 {
-  if ELEM (brush->sculpt_tool,
+  if (ELEM(brush->sculpt_tool,
            SCULPT_TOOL_GRAB,
            SCULPT_TOOL_POSE,
            SCULPT_TOOL_BOUNDARY,
            SCULPT_TOOL_THUMB,
-           SCULPT_TOOL_ELASTIC_DEFORM) {
+           SCULPT_TOOL_ELASTIC_DEFORM)) {
     return true;
   }
   if (brush->sculpt_tool == SCULPT_TOOL_CLOTH &&



More information about the Bf-blender-cvs mailing list