diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-13 06:31:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-13 06:31:50 +0300 |
commit | c67e5628d22f8348492b6205081fe1798d50689c (patch) | |
tree | 01b7b5e46f080f0359c06b389d7d1a544279e325 /source/blender/blenkernel/BKE_bvhutils.h | |
parent | 375dafe3ef40eb61e831902a1ae45ecca555fec6 (diff) |
Cleanup: Use std::mutex for mesh runtime mutexes
Instead of allocating three separate ThreadMutex pointers,
just embed std::mutex into the struct directly.
Diffstat (limited to 'source/blender/blenkernel/BKE_bvhutils.h')
-rw-r--r-- | source/blender/blenkernel/BKE_bvhutils.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index d22abd235df..a0a6ac58c58 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -11,6 +11,10 @@ #include "BLI_threads.h" #ifdef __cplusplus +# include <mutex> +#endif + +#ifdef __cplusplus extern "C" { #endif @@ -196,6 +200,8 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data, BVHCacheType bvh_cache_type, int tree_type); +#ifdef __cplusplus + /** * Builds or queries a BVH-cache for the cache BVH-tree of the request type. */ @@ -204,7 +210,9 @@ BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data, int tree_type, BVHCacheType bvh_cache_type, struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + std::mutex *mesh_eval_mutex); + +#endif /** * Frees data allocated by a call to `bvhtree_from_editmesh_*`. |