diff options
Diffstat (limited to 'source/blender/blenlib/BLI_resource_scope.hh')
-rw-r--r-- | source/blender/blenlib/BLI_resource_scope.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_resource_scope.hh b/source/blender/blenlib/BLI_resource_scope.hh index 9826b694e16..d3f6d5e3f13 100644 --- a/source/blender/blenlib/BLI_resource_scope.hh +++ b/source/blender/blenlib/BLI_resource_scope.hh @@ -128,7 +128,7 @@ template<typename Func> inline void ResourceScope::add_destruct_call(Func func) { void *buffer = allocator_.allocate(sizeof(Func), alignof(Func)); new (buffer) Func(std::move(func)); - this->add(buffer, [](void *data) { (*(Func *)data)(); }); + this->add(buffer, [](void *data) { (*static_cast<Func *>(data))(); }); } /** |