[Bf-blender-cvs] [2a4c6c612a2] geometry-nodes: Functions: add utility method
Jacques Lucke
noreply at git.blender.org
Fri Oct 23 15:14:10 CEST 2020
Commit: 2a4c6c612a2ee0e642b8f5ce1dd671e427a85b0a
Author: Jacques Lucke
Date: Fri Oct 23 15:01:07 2020 +0200
Branches: geometry-nodes
https://developer.blender.org/rB2a4c6c612a2ee0e642b8f5ce1dd671e427a85b0a
Functions: add utility method
===================================================================
M source/blender/functions/FN_generic_pointer.hh
===================================================================
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
More information about the Bf-blender-cvs
mailing list