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/nodes/function | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/nodes/function')
-rw-r--r-- | source/blender/nodes/function/nodes/node_fn_float_to_int.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/nodes/function/nodes/node_fn_float_to_int.cc b/source/blender/nodes/function/nodes/node_fn_float_to_int.cc index aad2f532d20..452768208c5 100644 --- a/source/blender/nodes/function/nodes/node_fn_float_to_int.cc +++ b/source/blender/nodes/function/nodes/node_fn_float_to_int.cc @@ -43,13 +43,13 @@ static const fn::MultiFunction *get_multi_function(const bNode &bnode) { static auto exec_preset = fn::CustomMF_presets::AllSpanOrSingle(); static fn::CustomMF_SI_SO<float, int> round_fn{ - "Round", [](float a) { return (int)round(a); }, exec_preset}; + "Round", [](float a) { return int(round(a)); }, exec_preset}; static fn::CustomMF_SI_SO<float, int> floor_fn{ - "Floor", [](float a) { return (int)floor(a); }, exec_preset}; + "Floor", [](float a) { return int(floor(a)); }, exec_preset}; static fn::CustomMF_SI_SO<float, int> ceil_fn{ - "Ceiling", [](float a) { return (int)ceil(a); }, exec_preset}; + "Ceiling", [](float a) { return int(ceil(a)); }, exec_preset}; static fn::CustomMF_SI_SO<float, int> trunc_fn{ - "Truncate", [](float a) { return (int)trunc(a); }, exec_preset}; + "Truncate", [](float a) { return int(trunc(a)); }, exec_preset}; switch (static_cast<FloatToIntRoundingMode>(bnode.custom1)) { case FN_NODE_FLOAT_TO_INT_ROUND: |