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
path: root/source
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-10-23 16:01:07 +0300
committerJacques Lucke <jacques@blender.org>2020-10-23 16:01:07 +0300
commit2a4c6c612a2ee0e642b8f5ce1dd671e427a85b0a (patch)
tree01515a7f967c592d6ab18ee28f06092e39f00011 /source
parentb062b922f9655e7efd2b6a8949c4d47f7a39efec (diff)
Functions: add utility method
Diffstat (limited to 'source')
-rw-r--r--source/blender/functions/FN_generic_pointer.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/functions/FN_generic_pointer.hh b/source/blender/functions/FN_generic_pointer.hh
index 4538d7169c2..5c2b611c614 100644
--- a/source/blender/functions/FN_generic_pointer.hh
+++ b/source/blender/functions/FN_generic_pointer.hh
@@ -65,6 +65,12 @@ class GMutablePointer {
{
return type_ != nullptr && type_->is<T>();
}
+
+ void destruct()
+ {
+ BLI_assert(data_ != nullptr);
+ type_->destruct(data_);
+ }
};
} // namespace blender::fn