Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-21 12:16:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-21 12:16:37 +0400
commit7db1d6556d2aefcf4e5e787477b7cd22104e15ac (patch)
treeb1cf518de6a88886e9566aae62dec168d2a96f20 /source/blender/editors
parent3ec1daaa77f20e1aeaae30b5beab675659e873f2 (diff)
code cleanup: add break statements in switch ()'s, (even at the last case).
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c61
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c1
-rw-r--r--source/blender/editors/animation/anim_markers.c6
-rw-r--r--source/blender/editors/animation/keyframing.c7
-rw-r--r--source/blender/editors/interface/interface.c1
-rw-r--r--source/blender/editors/interface/interface_handlers.c11
-rw-r--r--source/blender/editors/interface/interface_widgets.c6
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/editors/mask/mask_ops.c3
-rw-r--r--source/blender/editors/mesh/editmesh_select.c1
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c1
-rw-r--r--source/blender/editors/mesh/mesh_data.c1
-rw-r--r--source/blender/editors/object/object_edit.c20
-rw-r--r--source/blender/editors/object/object_hook.c6
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_vgroup.c9
-rw-r--r--source/blender/editors/screen/screen_ops.c8
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c7
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_action/space_action.c2
-rw-r--r--source/blender/editors/space_clip/space_clip.c4
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c3
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_graph/space_graph.c1
-rw-r--r--source/blender/editors/space_image/space_image.c1
-rw-r--r--source/blender/editors/space_info/space_info.c1
-rw-r--r--source/blender/editors/space_nla/nla_channels.c1
-rw-r--r--source/blender/editors/space_nla/nla_draw.c4
-rw-r--r--source/blender/editors/space_nla/space_nla.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c1
-rw-r--r--source/blender/editors/space_text/space_text.c2
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c2
-rw-r--r--source/blender/editors/space_time/space_time.c3
-rw-r--r--source/blender/editors/space_view3d/drawobject.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/transform/transform.c11
-rw-r--r--source/blender/editors/transform/transform_generics.c4
-rw-r--r--source/blender/editors/transform/transform_manipulator.c7
-rw-r--r--source/blender/editors/transform/transform_orientations.c4
-rw-r--r--source/blender/editors/util/numinput.c48
43 files changed, 153 insertions, 118 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index b2c63addb87..845ad72d7aa 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -574,8 +574,7 @@ static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (scene->adt)
return GET_ACF_FLAG_PTR(scene->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -719,9 +718,8 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ob->adt)
return GET_ACF_FLAG_PTR(ob->adt->flag, type);
- else
- return NULL;
-
+ return NULL;
+
default: /* unsupported */
return NULL;
}
@@ -1053,9 +1051,8 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *ty
if (adt) {
return GET_ACF_FLAG_PTR(adt->flag, type);
}
- else
- return NULL;
-
+ return NULL;
+
case ACHANNEL_SETTING_EXPAND: /* expanded */
return GET_ACF_FLAG_PTR(act->flag, type);
@@ -1213,9 +1210,8 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ma->adt)
return GET_ACF_FLAG_PTR(ma->adt->flag, type);
- else
- return NULL;
-
+ return NULL;
+
default: /* unsupported */
return NULL;
}
@@ -1290,8 +1286,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (la->adt)
return GET_ACF_FLAG_PTR(la->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1374,8 +1369,7 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (tex->adt)
return GET_ACF_FLAG_PTR(tex->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1451,8 +1445,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ca->adt)
return GET_ACF_FLAG_PTR(ca->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1538,8 +1531,7 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (cu->adt)
return GET_ACF_FLAG_PTR(cu->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1615,8 +1607,7 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (key->adt)
return GET_ACF_FLAG_PTR(key->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1692,8 +1683,7 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (wo->adt)
return GET_ACF_FLAG_PTR(wo->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1769,8 +1759,7 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (part->adt)
return GET_ACF_FLAG_PTR(part->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1846,8 +1835,7 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (mb->adt)
return GET_ACF_FLAG_PTR(mb->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -1923,8 +1911,7 @@ static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (arm->adt)
return GET_ACF_FLAG_PTR(arm->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2011,8 +1998,7 @@ static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *typ
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (ntree->adt)
return GET_ACF_FLAG_PTR(ntree->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2088,8 +2074,7 @@ static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, int setting, short
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (linestyle->adt)
return GET_ACF_FLAG_PTR(linestyle->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2165,8 +2150,7 @@ static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (me->adt)
return GET_ACF_FLAG_PTR(me->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2242,8 +2226,7 @@ static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (lt->adt)
return GET_ACF_FLAG_PTR(lt->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -2319,8 +2302,7 @@ static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
if (spk->adt)
return GET_ACF_FLAG_PTR(spk->adt->flag, type);
- else
- return NULL;
+ return NULL;
default: /* unsupported */
return NULL;
@@ -3439,6 +3421,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
case ACHANNEL_SETTING_EXPAND: /* expanding - cannot flush, otherwise all would open/close at once */
default:
uiButSetFunc(but, achannel_setting_widget_cb, NULL, NULL);
+ break;
}
}
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 59ae45e446a..e04c51b33d8 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2576,6 +2576,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
default:
if (G.debug & G_DEBUG)
printf("Error: Invalid channel type in mouse_anim_channels()\n");
+ break;
}
/* free channels */
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index da76ad8a832..fe41a037fcb 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -763,7 +763,6 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
MarkerMove *mm = op->customdata;
View2D *v2d = UI_view2d_fromcontext(C);
TimeMarker *marker, *selmarker = NULL;
- float dx, fac;
char str[256];
switch (event->type) {
@@ -791,6 +790,9 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
}
break;
case MOUSEMOVE:
+ {
+ float dx, fac;
+
if (hasNumInput(&mm->num))
break;
@@ -863,6 +865,8 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
ED_area_headerprint(CTX_wm_area(C), str);
}
+ break;
+ }
}
if (event->val == KM_PRESS) {
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 40273101ddf..63acc5a943c 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1962,10 +1962,11 @@ short id_frame_has_keyframe(ID *id, float frame, short filter)
return object_frame_has_keyframe((Object *)id, frame, filter);
break;
- case ID_SCE: /* scene */
+#if 0
// XXX TODO... for now, just use 'normal' behavior
- // break;
-
+ case ID_SCE: /* scene */
+ break;
+#endif
default: /* 'normal type' */
{
AnimData *adt = BKE_animdata_from_id(id);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index b59e06cbc0e..042ca942722 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2525,6 +2525,7 @@ void ui_check_but(uiBut *but)
break;
default:
BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR);
+ break;
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 68cf07f695f..ee316e13dad 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2183,7 +2183,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
ui_searchbox_event(C, data->searchbox, but, event);
break;
}
- /* pass on purposedly */
+ /* fall-through */
case ENDKEY:
ui_textedit_move(but, data, STRCUR_DIR_NEXT,
event->shift, STRCUR_JUMP_ALL);
@@ -2198,7 +2198,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
ui_searchbox_event(C, data->searchbox, but, event);
break;
}
- /* pass on purposedly */
+ /* fall-through */
case HOMEKEY:
ui_textedit_move(but, data, STRCUR_DIR_PREV,
event->shift, STRCUR_JUMP_ALL);
@@ -3722,6 +3722,7 @@ static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
break;
default:
BLI_assert(0);
+ break;
}
hsv_to_rgb_v(hsv, rgb);
@@ -3794,6 +3795,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF
break;
default:
assert(!"invalid hsv type");
+ break;
}
hsv_to_rgb_v(hsv, rgb);
@@ -6300,11 +6302,11 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
case MIDDLEMOUSE:
case MOUSEPAN:
button_timers_tooltip_remove(C, but);
-
- /* pass on purposedly */
+ /* fall-through */
default:
/* handle button type specific events */
retval = ui_do_button(C, block, but, event);
+ break;
}
}
else if (data->state == BUTTON_STATE_WAIT_RELEASE) {
@@ -6354,6 +6356,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
if (event->customdata == data->flashtimer) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
+ break;
}
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 18c6d969222..594d3e40dcd 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2060,6 +2060,7 @@ void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, cons
copy_v3_v3(col1[0], col1[2]);
copy_v3_v3(col1[1], col1[2]);
copy_v3_v3(col1[3], col1[2]);
+ break;
}
/* old below */
@@ -2969,7 +2970,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
case UI_WTYPE_LISTLABEL:
wt.wcol_theme = &btheme->tui.wcol_list_item;
- /* No break, we use usual label code too. */
+ /* fall-through */ /* we use usual label code too. */
case UI_WTYPE_LABEL:
wt.draw = NULL;
break;
@@ -3198,9 +3199,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
case SEPR:
ui_draw_separator(rect, &tui->wcol_menu_item);
break;
-
default:
wt = widget_type(UI_WTYPE_MENU_ITEM);
+ break;
}
}
else if (but->dt == UI_EMBOSSN) {
@@ -3385,6 +3386,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
default:
wt = widget_type(UI_WTYPE_REGULAR);
+ break;
}
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 32d3d274b47..dc780d6a4f1 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1353,7 +1353,8 @@ void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3]
UI_GetColorPtrBlendShade3ubv(src_col, col, dst_col, 0.5f, -10);
break;
default:
- BLI_assert(!"invalid axis arg");
+ BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 134806cf5bd..5c2aacf0713 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -655,8 +655,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
data->accurate = (event->val == KM_PRESS);
- /* no break! update CV position */
-
+ /* fall-through */ /* update CV position */
case MOUSEMOVE:
{
ScrArea *sa = CTX_wm_area(C);
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 313974d1b9d..f50ff45e83b 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1706,6 +1706,7 @@ bool EDBM_selectmode_toggle(bContext *C, const short selectmode_new,
break;
default:
BLI_assert(0);
+ break;
}
switch (selectmode_new) {
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 77a79e57dbc..bf9dd03f170 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -1622,6 +1622,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
break;
default:
BLI_assert(0);
+ break;
}
if (!ok) {
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 4cbb5f303f0..69049bd5a26 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -116,6 +116,7 @@ static CustomData *mesh_customdata_get_type(Mesh *me, const char htype, int *r_t
BLI_assert(0);
tot = 0;
data = NULL;
+ break;
}
*r_tot = tot;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 0a69306928a..784dddbfbf3 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1501,36 +1501,38 @@ static const char *object_mode_op_string(int mode)
/* checks the mode to be set is compatible with the object
* should be made into a generic function */
-static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
+static bool object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
{
ObjectMode mode = RNA_enum_get(op->ptr, "mode");
if (ob) {
if (mode == OB_MODE_OBJECT)
- return 1;
+ return true;
switch (ob->type) {
case OB_MESH:
if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
- return 1;
- return 0;
+ return true;
+ break;
case OB_CURVE:
case OB_SURF:
case OB_FONT:
case OB_MBALL:
if (mode & (OB_MODE_EDIT))
- return 1;
- return 0;
+ return true;
+ break;
case OB_LATTICE:
if (mode & (OB_MODE_EDIT | OB_MODE_WEIGHT_PAINT))
- return 1;
+ return true;
+ break;
case OB_ARMATURE:
if (mode & (OB_MODE_EDIT | OB_MODE_POSE))
- return 1;
+ return true;
+ break;
}
}
- return 0;
+ return false;
}
static int object_mode_set_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 1f0163bc391..d739d8d330f 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -318,12 +318,10 @@ static bool object_hook_index_array(Scene *scene, Object *obedit, int *tot, int
BKE_editmesh_tessface_calc(em);
/* check selected vertices first */
- if (return_editmesh_indexar(em, tot, indexar, cent_r)) {
- return true;
- }
- else {
+ if (return_editmesh_indexar(em, tot, indexar, cent_r) == 0) {
return return_editmesh_vgroup(obedit, em, name, cent_r);
}
+ return true;
}
case OB_CURVE:
case OB_SURF:
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index fbb17946454..54e8d8e6599 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -178,7 +178,7 @@ void load_editLatt(Object *obedit)
static int lattice_select_random_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);
- Lattice *lt = ((Lattice*)obedit->data)->editlatt->latt;
+ Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
const float randfac = RNA_float_get(op->ptr, "percent") / 100.0f;
int tot;
BPoint *bp;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 965aba5799b..9b3f1a4f3ac 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -290,9 +290,7 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
return true;
}
- else {
- return false;
- }
+ return false;
}
case ID_LT:
{
@@ -320,9 +318,7 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
return true;
}
- else {
- return false;
- }
+ return false;
}
}
}
@@ -1098,6 +1094,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
/* we checked if the vertex was added before so no need to test again, simply add */
defvert_add_index_notest(dv, def_nr, weight);
+ break;
}
}
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 0ef5b1561f1..ff2561dc66f 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1154,7 +1154,7 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* execute the events */
switch (event->type) {
case MOUSEMOVE:
-
+ {
x = RNA_int_get(op->ptr, "x");
y = RNA_int_get(op->ptr, "y");
@@ -1164,9 +1164,9 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
area_move_apply(C, op);
break;
-
+ }
case EVT_MODAL_MAP:
-
+ {
switch (event->val) {
case KM_MODAL_APPLY:
area_move_exit(C, op);
@@ -1182,6 +1182,8 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
md->step = 0;
break;
}
+ break;
+ }
}
return OPERATOR_RUNNING_MODAL;
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index e6d609d2008..576bbecb561 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -540,8 +540,9 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
case PAINT_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
+ break;
default:
- ;
+ break;
}
return true;
}
@@ -559,8 +560,9 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
case PAINT_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
+ break;
default:
- ;
+ break;
}
return true;
}
@@ -575,6 +577,7 @@ bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
case PAINT_SCULPT:
if (sculpt_is_grab_tool(br))
return false;
+ break;
default:
break;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f67cc0359a2..3aeb2f1597b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1177,6 +1177,7 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob,
case SCULPT_DISP_DIR_AREA:
calc_area_normal(sd, ob, an, nodes, totnode);
+ break;
default:
break;
@@ -2457,6 +2458,7 @@ static void calc_sculpt_plane(Sculpt *sd, Object *ob, PBVHNode **nodes, int totn
case SCULPT_DISP_DIR_AREA:
calc_area_normal_and_flatten_center(sd, ob, nodes, totnode, an, fc);
+ break;
default:
break;
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 7b0ff5a656f..a89a02b7e01 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -304,6 +304,7 @@ static void action_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
@@ -351,6 +352,7 @@ static void action_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index e6aff9d4d4f..562a8584560 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -348,7 +348,7 @@ static void clip_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
switch (wmn->data) {
case ND_FRAME:
clip_scopes_tag_refresh(sa);
- /* no break! */
+ /* fall-through */
case ND_FRAME_RANGE:
ED_area_tag_redraw(sa);
@@ -368,7 +368,7 @@ static void clip_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
case NA_EDITED:
case NA_EVALUATED:
clip_stabilization_tag_refresh(sa);
- /* no break! */
+ /* fall-through */
case NA_SELECTED:
clip_scopes_tag_refresh(sa);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 7899f9faf90..9afca413836 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -788,8 +788,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
data->accurate = event->val == KM_PRESS;
- /* no break! update area size */
-
+ /* fall-through */
case MOUSEMOVE:
mdelta[0] = event->mval[0] - data->mval[0];
mdelta[1] = event->mval[1] - data->mval[1];
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 4d904ab6551..8f25ac38963 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -535,6 +535,7 @@ FileList *filelist_new(short type)
default:
p->readf = filelist_read_dir;
p->filterf = is_filtered_file;
+ break;
}
return p;
@@ -993,6 +994,7 @@ void filelist_sort(struct FileList *filelist, short sort)
break;
case FILE_SORT_EXTENSION:
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_extension);
+ break;
}
filelist_filter(filelist);
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index 25101d89f1d..ccb98dfd13d 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -436,6 +436,7 @@ static void graph_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AReg
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 2b106e13836..5f54b214437 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -512,6 +512,7 @@ static void image_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
}
break;
}
+ break;
}
}
}
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 10b935502ba..07f4b64d187 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -271,6 +271,7 @@ static void info_header_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegi
case NC_ID:
if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index defe842a794..c0e559a34cf 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -319,6 +319,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
default:
if (G.debug & G_DEBUG)
printf("Error: Invalid channel type in mouse_nla_channels()\n");
+ break;
}
/* free channels */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 93007cc0820..b4c52a5b1ca 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -307,8 +307,8 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
glVertex2f(strip->start, yminc);
glEnd();
}
- /* no break needed... */
-
+ /* fall-through */
+
/* this only draws after the strip */
case NLASTRIP_EXTEND_HOLD_FORWARD:
/* only need to try and draw if the next strip doesn't occur immediately after */
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index e54c1e8323a..4d4f27cf1ad 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -427,6 +427,7 @@ static void nla_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARe
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
@@ -457,10 +458,10 @@ static void nla_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
if (wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
-
default:
if (wmn->data == ND_KEYS)
ED_region_tag_redraw(ar);
+ break;
}
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 93d0ff4f8c0..81207deea01 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -929,6 +929,7 @@ static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
case OL_KM_SPECIALS:
kmi->type = AKEY;
kmi->val = KM_PRESS;
+ break;
}
ED_region_tag_redraw(CTX_wm_region(C));
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 0f4a2d8b4dd..68fd09f5fb7 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -173,6 +173,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
default:
col[0] = 10; col[1] = 255; col[2] = 40;
+ break;
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index a4dea4e25b1..c13dc118de5 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -558,6 +558,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
return 0;
}
if (seq3 == NULL) seq3 = seq2;
+ break;
}
if (seq1 == NULL && seq2 == NULL && seq3 == NULL) {
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index e7fa4c05b9d..b04d2b16e8d 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -149,7 +149,7 @@ static void text_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
}
ED_area_tag_redraw(sa);
- /* no break -- fall down to tag redraw */
+ /* fall-through */ /* fall down to tag redraw */
case NA_ADDED:
case NA_REMOVED:
ED_area_tag_redraw(sa);
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 26e0be264a4..ba61399f6d5 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -433,6 +433,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
break;
case PAGEDOWNKEY:
scroll = SUGG_LIST_SIZE - 1;
+ /* fall-through */
case WHEELDOWNMOUSE:
case DOWNARROWKEY:
if (event->val == KM_PRESS) {
@@ -460,6 +461,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
break;
case PAGEUPKEY:
scroll = SUGG_LIST_SIZE - 1;
+ /* fall-through */
case WHEELUPMOUSE:
case UPARROWKEY:
if (event->val == KM_PRESS) {
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 8c36df74d22..f7116c01a72 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -201,9 +201,10 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene)
col[3] = 0.1;
break;
default:
- BLI_assert(0);
col[0] = 1.0; col[1] = 0.0; col[2] = 1.0;
col[3] = 0.1;
+ BLI_assert(0);
+ break;
}
glColor4fv(col);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 7f7a97c6836..02686d5b448 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4430,7 +4430,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
copy_m4_m4(imat, rv3d->viewinv);
normalize_v3(imat[0]);
normalize_v3(imat[1]);
- /* no break! */
+ /* fall-through */
case PART_DRAW_CROSS:
case PART_DRAW_AXIS:
/* lets calculate the scale: */
@@ -4604,6 +4604,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
break;
default:
intensity = 1.0f; /* should never happen */
+ BLI_assert(0);
+ break;
}
CLAMP(intensity, 0.f, 1.f);
weight_to_rgb(ma_col, intensity);
@@ -6905,6 +6907,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
drawaxes(1.0, OB_ARROWS);
}
+ break;
}
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 659c9a6c2e6..a1a13130b27 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -518,7 +518,7 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event)
#ifdef NDOF_FLY_DEBUG
puts("start keeping track of 3D mouse position");
#endif
- /* fall through... */
+ /* fall-through */
case P_IN_PROGRESS:
/* update 3D mouse position */
#ifdef NDOF_FLY_DEBUG
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 96cd5a22f58..16282b0d49c 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -856,6 +856,7 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc,
break;
default:
assert(!"lasso select on incorrect object type");
+ break;
}
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc->obedit->data);
@@ -2110,6 +2111,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
break;
default:
assert(!"border select on incorrect object type");
+ break;
}
}
else { /* no editmode, unified for bones and objects */
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 457a3b32e09..a565213f031 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1432,6 +1432,7 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
offset = -offset;
length = -length;
size = -size;
+ /* fall-through */
case RIGHT:
glBegin(GL_LINES);
glVertex2s(offset, 0);
@@ -1442,10 +1443,12 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
glVertex2s(offset + length - size, size);
glEnd();
break;
+
case DOWN:
offset = -offset;
length = -length;
size = -size;
+ /* fall-through */
case UP:
glBegin(GL_LINES);
glVertex2s(0, offset);
@@ -1464,6 +1467,7 @@ static void drawArrowHead(ArrowDirection d, short size)
switch (d) {
case LEFT:
size = -size;
+ /* fall-through */
case RIGHT:
glBegin(GL_LINES);
glVertex2s(0, 0);
@@ -1472,8 +1476,10 @@ static void drawArrowHead(ArrowDirection d, short size)
glVertex2s(-size, size);
glEnd();
break;
+
case DOWN:
size = -size;
+ /* fall-through */
case UP:
glBegin(GL_LINES);
glVertex2s(0, 0);
@@ -1747,6 +1753,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
break;
default:
proportional = PROP_EDIT_OFF;
+ break;
}
// If modal, save settings back in scene if not set as operator argument
@@ -2934,6 +2941,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
case 2:
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("Scale: %s : %s : %s%s %s"), &tvec[0],
&tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
+ break;
}
}
else {
@@ -3900,6 +3908,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, "D: %s D: %s D: %s (%s)%s %s %s",
&tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], distvec,
t->con.text, t->proptext, autoik);
+ break;
}
}
else {
@@ -5690,6 +5699,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
break;
}
}
+ break;
}
default:
break;
@@ -6222,6 +6232,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
calcVertSlideMouseActiveEdges(t, event->mval);
}
calcVertSlideCustomPoints(t);
+ break;
}
default:
break;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 666612880e5..cb0a0530036 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1667,7 +1667,7 @@ void calculateCenter(TransInfo *t)
projectIntView(t, t->center, t->center2d);
}
}
-
+ break;
}
}
@@ -1803,6 +1803,7 @@ void calculatePropRatio(TransInfo *t)
break;
default:
td->factor = 1;
+ break;
}
}
}
@@ -1830,6 +1831,7 @@ void calculatePropRatio(TransInfo *t)
break;
default:
t->proptext[0] = '\0';
+ break;
}
}
else {
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index fc61c94ff64..6fecf0d6642 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -602,7 +602,7 @@ int calc_manipulator_stats(const bContext *C)
break;
}
/* if not gimbal, fall through to normal */
- /* pass through */
+ /* fall-through */
}
case V3D_MANIP_NORMAL:
{
@@ -613,7 +613,7 @@ int calc_manipulator_stats(const bContext *C)
break;
}
/* no break we define 'normal' as 'local' in Object mode */
- /* pass through */
+ /* fall-through */
}
case V3D_MANIP_LOCAL:
{
@@ -840,7 +840,8 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c
UI_GetThemeColor3ubv(TH_AXIS_Z, col);
break;
default:
- BLI_assert(!"invalid axis arg");
+ BLI_assert(0);
+ break;
}
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 130e11d45aa..2be4a072d49 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -466,14 +466,14 @@ void initTransformOrientation(bContext *C, TransInfo *t)
strcpy(t->spacename, IFACE_("gimbal"));
break;
}
- /* no gimbal fallthrough to normal */
+ /* fall-through */ /* no gimbal fallthrough to normal */
case V3D_MANIP_NORMAL:
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
strcpy(t->spacename, IFACE_("normal"));
ED_getTransformOrientationMatrix(C, t->spacemtx, (v3d->around == V3D_ACTIVE));
break;
}
- /* no break we define 'normal' as 'local' in Object mode */
+ /* fall-through */ /* we define 'normal' as 'local' in Object mode */
case V3D_MANIP_LOCAL:
strcpy(t->spacename, IFACE_("local"));
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index bfe3b80eff4..3e5f879aa3c 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -109,6 +109,7 @@ void outputNumInput(NumInput *n, char *str)
break;
default:
BLI_snprintf(&str[j * ln], ln, "%s%.4e%c", inv, n->val[i], cur);
+ break;
}
}
}
@@ -201,8 +202,7 @@ char handleNumInput(NumInput *n, const wmEvent *event)
n->inv[idx] = 0;
}
break;
- case PERIODKEY:
- case PADPERIOD:
+ case PERIODKEY: case PADPERIOD:
if (n->flag & NUM_NO_FRACTION)
return 0;
@@ -213,11 +213,13 @@ char handleNumInput(NumInput *n, const wmEvent *event)
break;
case -1:
n->ctrl[idx] = -10;
+ break;
}
break;
case PADMINUS:
if (event->alt)
break;
+ /* fall-through */
case MINUSKEY:
if (n->flag & NUM_NO_NEGATIVE)
return 0;
@@ -229,8 +231,7 @@ char handleNumInput(NumInput *n, const wmEvent *event)
else
n->ctrl[idx] = -1;
break;
- case PADSLASHKEY:
- case SLASHKEY:
+ case PADSLASHKEY: case SLASHKEY:
if (n->flag & NUM_NO_FRACTION)
return 0;
@@ -245,35 +246,34 @@ char handleNumInput(NumInput *n, const wmEvent *event)
idx = 0;
n->idx = idx;
break;
- case PAD9:
- case NINEKEY:
+ case PAD9: case NINEKEY:
Val += 1.0f;
- case PAD8:
- case EIGHTKEY:
+ /* fall-through */
+ case PAD8: case EIGHTKEY:
Val += 1.0f;
- case PAD7:
- case SEVENKEY:
+ /* fall-through */
+ case PAD7: case SEVENKEY:
Val += 1.0f;
- case PAD6:
- case SIXKEY:
+ /* fall-through */
+ case PAD6: case SIXKEY:
Val += 1.0f;
- case PAD5:
- case FIVEKEY:
+ /* fall-through */
+ case PAD5: case FIVEKEY:
Val += 1.0f;
- case PAD4:
- case FOURKEY:
+ /* fall-through */
+ case PAD4: case FOURKEY:
Val += 1.0f;
- case PAD3:
- case THREEKEY:
+ /* fall-through */
+ case PAD3: case THREEKEY:
Val += 1.0f;
- case PAD2:
- case TWOKEY:
+ /* fall-through */
+ case PAD2: case TWOKEY:
Val += 1.0f;
- case PAD1:
- case ONEKEY:
+ /* fall-through */
+ case PAD1: case ONEKEY:
Val += 1.0f;
- case PAD0:
- case ZEROKEY:
+ /* fall-through */
+ case PAD0: case ZEROKEY:
if (!n->ctrl[idx])
n->ctrl[idx] = 1;