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/transform
parent3ec1daaa77f20e1aeaae30b5beab675659e873f2 (diff)
code cleanup: add break statements in switch ()'s, (even at the last case).
Diffstat (limited to 'source/blender/editors/transform')
-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
4 files changed, 20 insertions, 6 deletions
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"));