[Mesh] Minor code update

Removal of unnecessary comparison.
`QThread::idealThreadCount()` returns the ideal number of threads that the process can run in parallel or 1 if it fails to determine it.
This commit is contained in:
xtemp09
2023-03-08 17:38:11 +07:00
committed by wwmayer
parent 6c9d7ebc7a
commit eda50c13b0
2 changed files with 2 additions and 2 deletions

View File

@@ -336,7 +336,7 @@ void MeshFastBuilder::Finish ()
}
//std::sort(verts.begin(), verts.end());
int threads = std::max(1, QThread::idealThreadCount());
int threads = QThread::idealThreadCount();
MeshCore::parallel_sort(verts.begin(), verts.end(), std::less<Private::Vertex>(), threads);
QVector<FacetIndex> indices(ulCtPts);

View File

@@ -966,7 +966,7 @@ void MeshKernel::RebuildNeighbours (FacetIndex index)
// sort the edges
//std::sort(edges.begin(), edges.end(), Edge_Less());
int threads = std::max(1, QThread::idealThreadCount());
int threads = QThread::idealThreadCount();
MeshCore::parallel_sort(edges.begin(), edges.end(), Edge_Less(), threads);
PointIndex p0 = POINT_INDEX_MAX, p1 = POINT_INDEX_MAX;