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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_nodes.cc')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc10
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;