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_field.hh')
-rw-r--r--source/blender/functions/FN_field.hh21
1 files changed, 4 insertions, 17 deletions
diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh
index 77c1dedb721..4b0dee88491 100644
--- a/source/blender/functions/FN_field.hh
+++ b/source/blender/functions/FN_field.hh
@@ -107,26 +107,13 @@ class GField {
}
};
-template<typename T> class Field {
- private:
- GField field_;
-
+template<typename T> class Field : public GField {
public:
Field() = default;
- Field(GField field) : field_(std::move(field))
- {
- BLI_assert(field_.cpp_type().is<T>());
- }
-
- const GField *operator->() const
- {
- return &field_;
- }
-
- const GField &operator*() const
+ Field(GField field) : GField(std::move(field))
{
- return field_;
+ BLI_assert(this->cpp_type().template is<T>());
}
};
@@ -222,7 +209,7 @@ template<typename T> T evaluate_constant_field(const Field<T> &field)
{
T value;
value.~T();
- evaluate_constant_field(*field, &value);
+ evaluate_constant_field(field, &value);
return value;
}