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:
authorJacques Lucke <jacques@blender.org>2020-07-28 13:03:02 +0300
committerJacques Lucke <jacques@blender.org>2020-07-28 13:10:37 +0300
commit3b9e16a4f7b8deca23ba8d2a02ef9182eb9d6bb4 (patch)
tree210485641412e442d0d6fee197b022b04b7fdeda /source/blender/blenlib/BLI_resource_collector.hh
parentc8e45c3fe96ebbb4c75df568cc72a05421921a7e (diff)
Particles: initial support for the Time input node
Diffstat (limited to 'source/blender/blenlib/BLI_resource_collector.hh')
-rw-r--r--source/blender/blenlib/BLI_resource_collector.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_resource_collector.hh b/source/blender/blenlib/BLI_resource_collector.hh
index 10d610da618..e1be87d8af2 100644
--- a/source/blender/blenlib/BLI_resource_collector.hh
+++ b/source/blender/blenlib/BLI_resource_collector.hh
@@ -79,6 +79,12 @@ class ResourceCollector : NonCopyable, NonMovable {
*/
template<typename T> void add(destruct_ptr<T> resource, const char *name)
{
+ /* There is no need to keep track of such types. */
+ if (std::is_trivially_destructible_v<T>) {
+ resource.release();
+ return;
+ }
+
BLI_assert(resource.get() != nullptr);
this->add(
resource.release(),