diff options
Diffstat (limited to 'source/blender/functions')
3 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/functions/intern/field.cc b/source/blender/functions/intern/field.cc index 8fb56d7aa11..dca12859b72 100644 --- a/source/blender/functions/intern/field.cc +++ b/source/blender/functions/intern/field.cc @@ -744,7 +744,7 @@ int FieldEvaluator::add(GField field, GVArray *varray_ptr) dst_varrays_.append(nullptr); output_pointer_infos_.append(OutputPointerInfo{ varray_ptr, [](void *dst, const GVArray &varray, ResourceScope &UNUSED(scope)) { - *(GVArray *)dst = varray; + *static_cast<GVArray *>(dst) = varray; }}); return field_index; } diff --git a/source/blender/functions/intern/multi_function_builder.cc b/source/blender/functions/intern/multi_function_builder.cc index f21de46b74e..8a09ed37e19 100644 --- a/source/blender/functions/intern/multi_function_builder.cc +++ b/source/blender/functions/intern/multi_function_builder.cc @@ -27,8 +27,8 @@ CustomMF_GenericConstant::CustomMF_GenericConstant(const CPPType &type, CustomMF_GenericConstant::~CustomMF_GenericConstant() { if (owns_value_) { - signature_.param_types[0].data_type().single_type().destruct((void *)value_); - MEM_freeN((void *)value_); + signature_.param_types[0].data_type().single_type().destruct(const_cast<void *>(value_)); + MEM_freeN(const_cast<void *>(value_)); } } diff --git a/source/blender/functions/intern/multi_function_procedure_executor.cc b/source/blender/functions/intern/multi_function_procedure_executor.cc index 554395b91d7..4fe3c27ea27 100644 --- a/source/blender/functions/intern/multi_function_procedure_executor.cc +++ b/source/blender/functions/intern/multi_function_procedure_executor.cc @@ -449,7 +449,7 @@ class VariableState : NonCopyable, NonMovable { } else { new_value = value_allocator.obtain_GVectorArray_not_owned( - *(GVectorArray *)caller_provided_storage_); + *static_cast<GVectorArray *>(caller_provided_storage_)); } if (value_ != nullptr) { if (value_->type == ValueType::GVVectorArray) { @@ -780,8 +780,9 @@ class VariableState : NonCopyable, NonMovable { break; } case ValueType::Span: { - const Span<bool> span((bool *)this->value_as<VariableValue_Span>()->data, - mask.min_array_size()); + const Span<bool> span( + static_cast<const bool *>(this->value_as<VariableValue_Span>()->data), + mask.min_array_size()); for (const int i : mask) { r_indices[span[i]].append(i); } @@ -790,7 +791,7 @@ class VariableState : NonCopyable, NonMovable { case ValueType::OneSingle: { auto *value_typed = this->value_as<VariableValue_OneSingle>(); BLI_assert(value_typed->is_initialized); - const bool condition = *(bool *)value_typed->data; + const bool condition = *static_cast<const bool *>(value_typed->data); r_indices[condition].extend(mask); break; } |