Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Wed, 3 Oct 2018 23:23:58 +0000 (09:23 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 3 Oct 2018 23:33:49 +0000 (09:33 +1000)
source/blender/blenkernel/intern/unit.c
source/blender/draw/modes/object_mode.c
source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
source/blender/editors/transform/transform_gizmo_3d.c
source/blender/editors/util/numinput.c

index c132053a82b6dda0e207f41fd2e19bd8eb08e671..bca7b3dd35777ffb59b5dd47b49df1e2a943ba83 100644 (file)
@@ -346,7 +346,7 @@ static void unit_dual_convert(
         double value, const bUnitCollection *usys,
         bUnitDef const **r_unit_a, bUnitDef const **r_unit_b,
         double *r_value_a, double *r_value_b,
-               const bUnitDef *main_unit)
+        const bUnitDef *main_unit)
 {
        const bUnitDef *unit;
        if (main_unit) unit = main_unit;
@@ -500,25 +500,24 @@ static const bUnitDef *get_preferred_unit_if_used(int type, PreferredUnits units
 
        int max_offset = usys->length - 1;
 
-       switch (type)
-       {
-       case B_UNIT_LENGTH:
-       case B_UNIT_AREA:
-       case B_UNIT_VOLUME:
-               if (units.length == USER_UNIT_ADAPTIVE) return NULL;
-               return usys->units + MIN2(units.length, max_offset);
-       case B_UNIT_MASS:
-               if (units.mass == USER_UNIT_ADAPTIVE) return NULL;
-               return usys->units + MIN2(units.mass, max_offset);
-       case B_UNIT_TIME:
-               if (units.time == USER_UNIT_ADAPTIVE) return NULL;
-               return usys->units + MIN2(units.time, max_offset);
-       case B_UNIT_ROTATION:
-               if (units.rotation == 0) return usys->units + 0;
-               else if (units.rotation == USER_UNIT_ROT_RADIANS) return usys->units + 3;
-               break;
-       default:
-               break;
+       switch (type) {
+               case B_UNIT_LENGTH:
+               case B_UNIT_AREA:
+               case B_UNIT_VOLUME:
+                       if (units.length == USER_UNIT_ADAPTIVE) return NULL;
+                       return usys->units + MIN2(units.length, max_offset);
+               case B_UNIT_MASS:
+                       if (units.mass == USER_UNIT_ADAPTIVE) return NULL;
+                       return usys->units + MIN2(units.mass, max_offset);
+               case B_UNIT_TIME:
+                       if (units.time == USER_UNIT_ADAPTIVE) return NULL;
+                       return usys->units + MIN2(units.time, max_offset);
+               case B_UNIT_ROTATION:
+                       if (units.rotation == 0) return usys->units + 0;
+                       else if (units.rotation == USER_UNIT_ROT_RADIANS) return usys->units + 3;
+                       break;
+               default:
+                       break;
        }
        return NULL;
 }
@@ -964,4 +963,4 @@ double bUnit_GetScaler(const void *usys_pt, int index)
 bool bUnit_IsSuppressed(const void *usys_pt, int index)
 {
        return (((bUnitCollection *)usys_pt)->units[index].flag & B_UNIT_DEF_SUPPRESS) != 0;
-}
\ No newline at end of file
+}
index 3b95f0b86d097bdf103c0e8908222f6b65e3d8e2..f18125af00549a96e973d3cc82a35da0c00e69c5 100644 (file)
@@ -2764,7 +2764,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
                case OB_GPENCIL:
                        /* in all modes except object mode hide always */
                        if ((OBACT(view_layer)) &&
-                               (OBACT(view_layer)->mode != OB_MODE_OBJECT))
+                           (OBACT(view_layer)->mode != OB_MODE_OBJECT))
                        {
                                break;
                        }
index 7dc0a24add92fc04eef5362e7e39ab097e6f8a63..fa8dd38cad62beff3c6f5919b481a2a31b13221a 100644 (file)
@@ -357,7 +357,7 @@ static void dial_draw_intern(
        }
 
        if (draw_options & ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_VALUE &&
-          (gz->flag & WM_GIZMO_DRAW_VALUE))
+           (gz->flag & WM_GIZMO_DRAW_VALUE))
        {
                DialInteraction *inter = gz->interaction_data;
                if (inter) {
index 097e902105ba5e6afaf1a1e296a1a9c79e7aacc7..90f94eb268aabb4d74e9cb168761bcbbf964b37f 100644 (file)
@@ -1283,8 +1283,8 @@ void drawDial3d(const TransInfo *t)
                scale *= ED_view3d_pixel_size_no_ui_scale(t->ar->regiondata, mat_final[3]);
                mul_mat3_m4_fl(mat_final, scale);
 
-               if ((t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID))
-                   && activeSnap(t))
+               if ((t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID)) &&
+                   activeSnap(t))
                {
                        increment = (t->modifiers & MOD_PRECISION) ? t->snap[2] : t->snap[1];
                }
index 887c85300d1605cd556b4a7b881c014037f37623..52cf1b2d708147ed4973495c02e4be660b63902b 100644 (file)
@@ -556,7 +556,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
                }
                else {
                        n->val_flag[idx] |= NUM_INVALID;
-       }
+               }
 
 
 #ifdef USE_FAKE_EDIT