diff --git a/libs/Common/FastDelegate.h b/libs/Common/FastDelegate.h index 72206cb35..5d3428204 100644 --- a/libs/Common/FastDelegate.h +++ b/libs/Common/FastDelegate.h @@ -146,7 +146,7 @@ class delegate { using functor_type = typename ::std::decay::type; - if ((sizeof(functor_type) > store_size_) || !store_.unique()) + if ((sizeof(functor_type) > store_size_) || store_.use_count() != 1) { store_.reset(operator new(sizeof(functor_type)), functor_deleter); store_size_ = sizeof(functor_type); diff --git a/libs/MVS/Mesh.h b/libs/MVS/Mesh.h index 9e54ff806..411da78cf 100644 --- a/libs/MVS/Mesh.h +++ b/libs/MVS/Mesh.h @@ -190,8 +190,8 @@ class MVS_API Mesh void Decimate(VertexIdxArr& verticesRemove); void CloseHole(VertexIdxArr& vertsLoop); void CloseHoleQuality(VertexIdxArr& vertsLoop); - FIndex RemoveDegenerateFaces(Type thArea=1e-5f); - FIndex RemoveDegenerateFaces(unsigned maxIterations, Type thArea=1e-5f); + FIndex RemoveDegenerateFaces(Type thArea=1e-10f); + FIndex RemoveDegenerateFaces(unsigned maxIterations, Type thArea=1e-10f); void RemoveFacesOutside(const OBB3f&); void RemoveFaces(FaceIdxArr& facesRemove, bool bUpdateLists=false); void RemoveVertices(VertexIdxArr& vertexRemove, bool bUpdateLists=false);