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/python/mathutils
parent3ec1daaa77f20e1aeaae30b5beab675659e873f2 (diff)
code cleanup: add break statements in switch ()'s, (even at the last case).
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c3
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c5
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c4
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c3
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c12
5 files changed, 17 insertions, 10 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index ae5b381cf59..9c3edec108a 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -170,7 +170,8 @@ static PyObject *Color_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 517fd9045e5..6bb3031f0a3 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -64,7 +64,7 @@ static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
case 2:
if ((order = euler_order_from_string(order_str, "mathutils.Euler()")) == -1)
return NULL;
- /* intentionally pass through */
+ /* fall-through */
case 1:
if (mathutils_array_parse(eul, EULER_SIZE, EULER_SIZE, seq, "mathutils.Euler()") == -1)
return NULL;
@@ -356,7 +356,8 @@ static PyObject *Euler_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 26793139227..d471cd05a2b 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -371,6 +371,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
}
}
+ break;
}
}
@@ -1752,7 +1753,8 @@ static PyObject *Matrix_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index a3f6b3f7c79..b0b818faaa0 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -529,7 +529,8 @@ static PyObject *Quaternion_richcmpr(PyObject *a, PyObject *b, int op)
switch (op) {
case Py_NE:
- ok = !ok; /* pass through */
+ ok = !ok;
+ /* fall-through */
case Py_EQ:
res = ok ? Py_False : Py_True;
break;
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index ab83a11e797..8509c46b395 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -720,8 +720,8 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
return NULL;
}
else {
- short use_a = TRUE;
- short use_b = TRUE;
+ bool use_a = true;
+ bool use_b = true;
float lambda;
PyObject *ret = PyTuple_New(2);
@@ -729,15 +729,16 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
switch (isect_line_sphere_v3(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
case 1:
if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
- use_b = FALSE;
+ use_b = false;
break;
case 2:
if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = FALSE;
break;
default:
- use_a = FALSE;
- use_b = FALSE;
+ use_a = false;
+ use_b = false;
+ break;
}
if (use_a) { PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(isect_a, 3, Py_NEW, NULL)); }
@@ -811,6 +812,7 @@ static PyObject *M_Geometry_intersect_line_sphere_2d(PyObject *UNUSED(self), PyO
default:
use_a = false;
use_b = false;
+ break;
}
if (use_a) { PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(isect_a, 2, Py_NEW, NULL)); }