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/modifiers/intern/MOD_nodes.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/modifiers/intern/MOD_nodes.cc')
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index a878793a34d..7c5bb988012 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -443,8 +443,8 @@ id_property_create_from_socket(const bNodeSocket &socket) auto property = bke::idprop::create(socket.identifier, value->value); IDPropertyUIDataFloat *ui_data = (IDPropertyUIDataFloat *)IDP_ui_data_ensure(property.get()); ui_data->base.rna_subtype = value->subtype; - ui_data->min = ui_data->soft_min = (double)value->min; - ui_data->max = ui_data->soft_max = (double)value->max; + ui_data->min = ui_data->soft_min = double(value->min); + ui_data->max = ui_data->soft_max = double(value->max); ui_data->default_value = value->value; return property; } @@ -466,8 +466,8 @@ id_property_create_from_socket(const bNodeSocket &socket) socket.identifier, Span<float>{value->value[0], value->value[1], value->value[2]}); IDPropertyUIDataFloat *ui_data = (IDPropertyUIDataFloat *)IDP_ui_data_ensure(property.get()); ui_data->base.rna_subtype = value->subtype; - ui_data->min = ui_data->soft_min = (double)value->min; - ui_data->max = ui_data->soft_max = (double)value->max; + ui_data->min = ui_data->soft_min = double(value->min); + ui_data->max = ui_data->soft_max = double(value->max); ui_data->default_array = (double *)MEM_mallocN(sizeof(double[3]), "mod_prop_default"); ui_data->default_array_len = 3; for (const int i : IndexRange(3)) { @@ -579,7 +579,7 @@ static void init_socket_cpp_value_from_property(const IDProperty &property, value = IDP_Float(&property); } else if (property.type == IDP_DOUBLE) { - value = (float)IDP_Double(&property); + value = float(IDP_Double(&property)); } new (r_value) ValueOrField<float>(value); break; |