diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-30 07:16:14 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-30 07:51:49 +0300 |
commit | 8bdd4b468554446cb1351785f0db751e2f84341f (patch) | |
tree | d81bda8a17f036de212b2982d7b13093f5b35a9e /source/blender/editors/sculpt_paint | |
parent | 1c1dc5f8440d918aca480904c53e31a528aef42f (diff) |
Cleanup: use function style casts for C++
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_automasking.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc index f22a05ef897..f0ce901e059 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc @@ -399,7 +399,7 @@ static void sculpt_calc_blurred_cavity(SculptSession *ss, sco1 = SCULPT_vertex_co_get(ss, vertex); } else { - sco1 /= (float)sco1_len; + sco1 /= float(sco1_len); len1_sum /= sco1_len; } @@ -407,7 +407,7 @@ static void sculpt_calc_blurred_cavity(SculptSession *ss, sco2 = SCULPT_vertex_co_get(ss, vertex); } else { - sco2 /= (float)sco2_len; + sco2 /= float(sco2_len); } normalize_v3(sno1); @@ -448,8 +448,8 @@ int SCULPT_automasking_settings_hash(Object *ob, AutomaskingCache *automasking) for (int i = 0; i < cm->totpoint; i++) { hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&cm->curve[i].x)); hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&cm->curve[i].y)); - hash = BLI_hash_int_2d(hash, (uint)cm->curve[i].flag); - hash = BLI_hash_int_2d(hash, (uint)cm->curve[i].shorty); + hash = BLI_hash_int_2d(hash, uint(cm->curve[i].flag)); + hash = BLI_hash_int_2d(hash, uint(cm->curve[i].shorty)); } } } @@ -778,11 +778,11 @@ static void sculpt_normal_occlusion_automasking_fill(AutomaskingCache *automaski float f = *(float *)SCULPT_vertex_attr_get(vertex, ss->attrs.automasking_factor); - if ((int)mode & BRUSH_AUTOMASKING_BRUSH_NORMAL) { + if (int(mode) & BRUSH_AUTOMASKING_BRUSH_NORMAL) { f *= automasking_brush_normal_factor(automasking, ss, vertex, &nodedata); } - if ((int)mode & BRUSH_AUTOMASKING_VIEW_NORMAL) { - if ((int)mode & BRUSH_AUTOMASKING_VIEW_OCCLUSION) { + if (int(mode) & BRUSH_AUTOMASKING_VIEW_NORMAL) { + if (int(mode) & BRUSH_AUTOMASKING_VIEW_OCCLUSION) { f *= automasking_view_occlusion_factor(automasking, ss, vertex, -1, &nodedata); } |