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 <campbell@blender.org>2022-09-25 11:33:28 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 13:17:08 +0300
commitf68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch)
tree2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/editors/space_node/node_select.cc
parentc7b247a118e302a3afc6473797e53b6af28b69e2 (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/editors/space_node/node_select.cc')
-rw-r--r--source/blender/editors/space_node/node_select.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_select.cc b/source/blender/editors/space_node/node_select.cc
index d93b205b1b7..1b47316ebd0 100644
--- a/source/blender/editors/space_node/node_select.cc
+++ b/source/blender/editors/space_node/node_select.cc
@@ -843,8 +843,7 @@ static int node_circleselect_exec(bContext *C, wmOperator *op)
int x, y, radius;
float2 offset;
- float zoom = (float)(BLI_rcti_size_x(&region->winrct)) /
- (float)(BLI_rctf_size_x(&region->v2d.cur));
+ float zoom = float(BLI_rcti_size_x(&region->winrct)) / float(BLI_rctf_size_x(&region->v2d.cur));
const eSelectOp sel_op = ED_select_op_modal(
(eSelectOp)RNA_enum_get(op->ptr, "mode"),
@@ -867,7 +866,7 @@ static int node_circleselect_exec(bContext *C, wmOperator *op)
/* Frame nodes are selectable by their borders (including their whole rect - as for other
* nodes - would prevent selection of _only_ other nodes inside that frame. */
rctf frame_inside = node_frame_rect_inside(*node);
- const float radius_adjusted = (float)radius / zoom;
+ const float radius_adjusted = float(radius) / zoom;
BLI_rctf_pad(&frame_inside, -2.0f * radius_adjusted, -2.0f * radius_adjusted);
if (BLI_rctf_isect_circle(&node->totr, offset, radius_adjusted) &&
!BLI_rctf_isect_circle(&frame_inside, offset, radius_adjusted)) {