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/functions/FN_multi_function_builder.hh')
-rw-r--r--source/blender/functions/FN_multi_function_builder.hh18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh
index c2c95f7c355..95e216558e7 100644
--- a/source/blender/functions/FN_multi_function_builder.hh
+++ b/source/blender/functions/FN_multi_function_builder.hh
@@ -59,7 +59,7 @@ template<typename In1, typename Out1> class CustomMF_SI_SO : public MultiFunctio
template<typename ElementFuncT> static FunctionT create_function(ElementFuncT element_fn)
{
return [=](IndexMask mask, VSpan<In1> in1, MutableSpan<Out1> out1) {
- mask.foreach_index([&](uint i) { new ((void *)&out1[i]) Out1(element_fn(in1[i])); });
+ mask.foreach_index([&](int i) { new ((void *)&out1[i]) Out1(element_fn(in1[i])); });
};
}
@@ -101,7 +101,7 @@ class CustomMF_SI_SI_SO : public MultiFunction {
template<typename ElementFuncT> static FunctionT create_function(ElementFuncT element_fn)
{
return [=](IndexMask mask, VSpan<In1> in1, VSpan<In2> in2, MutableSpan<Out1> out1) {
- mask.foreach_index([&](uint i) { new ((void *)&out1[i]) Out1(element_fn(in1[i], in2[i])); });
+ mask.foreach_index([&](int i) { new ((void *)&out1[i]) Out1(element_fn(in1[i], in2[i])); });
};
}
@@ -152,7 +152,7 @@ class CustomMF_SI_SI_SI_SO : public MultiFunction {
VSpan<In3> in3,
MutableSpan<Out1> out1) {
mask.foreach_index(
- [&](uint i) { new ((void *)&out1[i]) Out1(element_fn(in1[i], in2[i], in3[i])); });
+ [&](int i) { new ((void *)&out1[i]) Out1(element_fn(in1[i], in2[i], in3[i])); });
};
}
@@ -191,7 +191,7 @@ template<typename Mut1> class CustomMF_SM : public MultiFunction {
template<typename ElementFuncT> static FunctionT create_function(ElementFuncT element_fn)
{
return [=](IndexMask mask, MutableSpan<Mut1> mut1) {
- mask.foreach_index([&](uint i) { element_fn(mut1[i]); });
+ mask.foreach_index([&](int i) { element_fn(mut1[i]); });
};
}
@@ -220,7 +220,7 @@ template<typename From, typename To> class CustomMF_Convert : public MultiFuncti
VSpan<From> inputs = params.readonly_single_input<From>(0);
MutableSpan<To> outputs = params.uninitialized_single_output<To>(1);
- for (uint i : mask) {
+ for (int64_t i : mask) {
new ((void *)&outputs[i]) To(inputs[i]);
}
}
@@ -240,7 +240,7 @@ class CustomMF_GenericConstant : public MultiFunction {
public:
CustomMF_GenericConstant(const CPPType &type, const void *value);
void call(IndexMask mask, MFParams params, MFContext context) const override;
- uint32_t hash() const override;
+ uint64_t hash() const override;
bool equals(const MultiFunction &other) const override;
};
@@ -276,10 +276,10 @@ template<typename T> class CustomMF_Constant : public MultiFunction {
void call(IndexMask mask, MFParams params, MFContext UNUSED(context)) const override
{
MutableSpan<T> output = params.uninitialized_single_output<T>(0);
- mask.foreach_index([&](uint i) { new (&output[i]) T(value_); });
+ mask.foreach_index([&](int i) { new (&output[i]) T(value_); });
}
- uint32_t hash() const override
+ uint64_t hash() const override
{
return DefaultHash<T>{}(value_);
}
@@ -304,7 +304,7 @@ template<typename T> class CustomMF_Constant : public MultiFunction {
class CustomMF_DefaultOutput : public MultiFunction {
private:
- uint output_amount_;
+ int output_amount_;
public:
CustomMF_DefaultOutput(StringRef name,