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>2015-01-31 09:23:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-01-31 17:17:21 +0300
commit9e9cd77b8de68015a98659671272cc9d78710e69 (patch)
treea705baa2b3d4c2667085815c865a826c1f884173 /source/blender/bmesh
parent535de7ec1fee94eae1769630b512c6ef4eb5bcad (diff)
Compiler warning: double-promotion
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c2
-rw-r--r--source/blender/bmesh/operators/bmo_extrude.c6
-rw-r--r--source/blender/bmesh/operators/bmo_removedoubles.c2
-rw-r--r--source/blender/bmesh/operators/bmo_similar.c4
-rw-r--r--source/blender/bmesh/tools/bmesh_intersect.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index 8cd9ee14bcb..ecb41363761 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -475,7 +475,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
{
BMOpSlot *einput = BMO_slot_get(op->slots_in, "edges");
BMOpSlot *vinput = BMO_slot_get(op->slots_in, "verts");
- const float angle_max = (float)M_PI / 2.0f;
+ const float angle_max = M_PI_2;
const float angle_limit = min_ff(angle_max, BMO_slot_float_get(op->slots_in, "angle_limit"));
const bool do_dissolve_boundaries = BMO_slot_bool_get(op->slots_in, "use_dissolve_boundaries");
const BMO_Delimit delimit = BMO_slot_int_get(op->slots_in, "delimit");
diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c
index 88b53b63abb..aa92c3054cd 100644
--- a/source/blender/bmesh/operators/bmo_extrude.c
+++ b/source/blender/bmesh/operators/bmo_extrude.c
@@ -608,10 +608,10 @@ static void calc_solidify_normals(BMesh *bm)
}
else {
/* only one face attached to that edge */
- /* an edge without another attached- the weight on this is
- * undefined, M_PI / 2 is 90d in radians and that seems good enough */
+ /* an edge without another attached- the weight on this is undefined,
+ * M_PI_2 is 90d in radians and that seems good enough */
copy_v3_v3(edge_normal, f1->no);
- mul_v3_fl(edge_normal, M_PI / 2);
+ mul_v3_fl(edge_normal, M_PI_2);
}
add_v3_v3(e->v1->no, edge_normal);
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c
index 9c8b9ca160d..871bee64c19 100644
--- a/source/blender/bmesh/operators/bmo_removedoubles.c
+++ b/source/blender/bmesh/operators/bmo_removedoubles.c
@@ -529,7 +529,7 @@ static void bmesh_find_doubles_common(BMesh *bm, BMOperator *op,
const float dist = BMO_slot_float_get(op->slots_in, "dist");
const float dist_sq = dist * dist;
- const float dist3 = (M_SQRT3 + 0.00005f) * dist; /* Just above sqrt(3) */
+ const float dist3 = ((float)M_SQRT3 + 0.00005f) * dist; /* Just above sqrt(3) */
/* Test whether keep_verts arg exists and is non-empty */
if (BMO_slot_exists(op->slots_in, "keep_verts")) {
diff --git a/source/blender/bmesh/operators/bmo_similar.c b/source/blender/bmesh/operators/bmo_similar.c
index 02462e380b4..5f8438919df 100644
--- a/source/blender/bmesh/operators/bmo_similar.c
+++ b/source/blender/bmesh/operators/bmo_similar.c
@@ -412,10 +412,10 @@ void bmo_similar_edges_exec(BMesh *bm, BMOperator *op)
/* compute the angle between the two edges */
angle = angle_normalized_v3v3(e_ext[i].dir, e_ext[indices[idx]].dir);
- if (angle > (float)(M_PI / 2.0)) /* use the smallest angle between the edges */
+ if (angle > (float)M_PI_2) /* use the smallest angle between the edges */
angle = fabsf(angle - (float)M_PI);
- if (angle / (float)(M_PI / 2.0) <= thresh) {
+ if (angle / (float)M_PI_2 <= thresh) {
BMO_elem_flag_enable(bm, e, EDGE_MARK);
cont = false;
}
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index 8a1569630fa..26b53a21709 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -541,7 +541,7 @@ static void bm_isect_tri_tri(
if (((1 << i_b_e0) | (1 << i_b_e1)) & b_mask)
continue;
fac = line_point_factor_v3(fv_a[i_a]->co, fv_b[i_b_e0]->co, fv_b[i_b_e1]->co);
- if ((fac > 0.0f - s->epsilon.eps) && (fac < 1.0 + s->epsilon.eps)) {
+ if ((fac > 0.0f - s->epsilon.eps) && (fac < 1.0f + s->epsilon.eps)) {
float ix[3];
interp_v3_v3v3(ix, fv_b[i_b_e0]->co, fv_b[i_b_e1]->co, fac);
if (len_squared_v3v3(ix, fv_a[i_a]->co) <= s->epsilon.eps2x_sq) {
@@ -579,7 +579,7 @@ static void bm_isect_tri_tri(
if (((1 << i_a_e0) | (1 << i_a_e1)) & a_mask)
continue;
fac = line_point_factor_v3(fv_b[i_b]->co, fv_a[i_a_e0]->co, fv_a[i_a_e1]->co);
- if ((fac > 0.0 - s->epsilon.eps) && (fac < 1.0 + s->epsilon.eps)) {
+ if ((fac > 0.0f - s->epsilon.eps) && (fac < 1.0f + s->epsilon.eps)) {
float ix[3];
interp_v3_v3v3(ix, fv_a[i_a_e0]->co, fv_a[i_a_e1]->co, fac);
if (len_squared_v3v3(ix, fv_b[i_b]->co) <= s->epsilon.eps2x_sq) {