fix: simplify use_count comparison

This commit is contained in:
Amin Yahyaabadi
2021-12-29 16:19:54 -06:00
parent d9f380857e
commit 71e81b4db2
+1 -1
View File
@@ -14833,7 +14833,7 @@ bool ON_MeshCache::Transform(
continue;
// NOTE: use_count() == 1 is an approximation in multi-threaded environments
// https:// en.cppreference.com/w/cpp/memory/shared_ptr/unique
if (false == item->m_mesh_sp.use_count() == 1)
if (item->m_mesh_sp.use_count() != 1)
{
// make a copy and transform the copy
std::shared_ptr<ON_Mesh>(new ON_Mesh(*mesh)).swap(item->m_mesh_sp);