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/intern/object_update.cc | |
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/intern/object_update.cc')
-rw-r--r-- | source/blender/blenkernel/intern/object_update.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object_update.cc b/source/blender/blenkernel/intern/object_update.cc index f6a765e8809..ceef6404bf0 100644 --- a/source/blender/blenkernel/intern/object_update.cc +++ b/source/blender/blenkernel/intern/object_update.cc @@ -373,10 +373,8 @@ void BKE_object_select_update(Depsgraph *depsgraph, Object *object) DEG_debug_print_eval(depsgraph, __func__, object->id.name, object); if (object->type == OB_MESH && !object->runtime.is_data_eval_owned) { Mesh *mesh_input = (Mesh *)object->runtime.data_orig; - blender::bke::MeshRuntime *mesh_runtime = mesh_input->runtime; - BLI_mutex_lock(static_cast<ThreadMutex *>(mesh_runtime->eval_mutex)); + std::lock_guard lock{mesh_input->runtime->eval_mutex}; BKE_object_data_select_update(depsgraph, static_cast<ID *>(object->data)); - BLI_mutex_unlock(static_cast<ThreadMutex *>(mesh_runtime->eval_mutex)); } else { BKE_object_data_select_update(depsgraph, static_cast<ID *>(object->data)); |