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/mathutils_geometry.c
parent3ec1daaa77f20e1aeaae30b5beab675659e873f2 (diff)
code cleanup: add break statements in switch ()'s, (even at the last case).
Diffstat (limited to 'source/blender/python/mathutils/mathutils_geometry.c')
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c12
1 files changed, 7 insertions, 5 deletions
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)); }