diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/editors/space_node/node_select.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (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.cc | 5 |
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(®ion->winrct)) / - (float)(BLI_rctf_size_x(®ion->v2d.cur)); + float zoom = float(BLI_rcti_size_x(®ion->winrct)) / float(BLI_rctf_size_x(®ion->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)) { |