diff options
author | Jacques Lucke <jacques@blender.org> | 2022-09-25 18:39:45 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-09-25 18:39:45 +0300 |
commit | c6e70e7bacf82b38ca7125d6821713a711489c0b (patch) | |
tree | 3679590f6254b7fbbd6623080edafe217f20c7b6 /source/blender/blenlib/BLI_resource_scope.hh | |
parent | 0419ee871ff960f62e28a2a9fed764f66c616d71 (diff) |
Cleanup: follow C++ type cast style guide in some files
https://wiki.blender.org/wiki/Style_Guide/C_Cpp#C.2B.2B_Type_Cast
This was discussed in https://devtalk.blender.org/t/rfc-style-guide-for-type-casts-in-c-code/25907.
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))(); }); } /** |