Fix linux compilation

This commit is contained in:
Romain Janvier
2024-09-29 10:27:39 +02:00
parent 971ccdde99
commit 9a5ef82e56
4 changed files with 16 additions and 11 deletions
+7 -4
View File
@@ -18,6 +18,7 @@
#include "qVoxFallProcess.h"
//system
#include <atomic>
#include <unordered_set>
//local
@@ -287,7 +288,7 @@ bool ClusterEmptySpace(int maxThreads, int voxelCount, GenericProgressCallback*
bool ComputeClusterVolume(int maxThreads, int clusterCount, ccHObject* clusterGroup = nullptr)
{
bool error = false;
std::atomic<bool> error(false);
CCVector3 minBound = s_VoxFallParams.maxBound;
CCVector3 maxBound = s_VoxFallParams.minBound;
int count = 0;
@@ -303,6 +304,10 @@ bool ComputeClusterVolume(int maxThreads, int clusterCount, ccHObject* clusterGr
{
int index = s_VoxFallParams.clusterIndices[i];
if(error) {
continue;
}
std::unordered_set<unsigned int> nbs_next(s_VoxFallParams.nbs[index].begin(), s_VoxFallParams.nbs[index].end());
while (!nbs_next.empty())
{
@@ -346,9 +351,7 @@ bool ComputeClusterVolume(int maxThreads, int clusterCount, ccHObject* clusterGr
if (!s_VoxFallParams.nProgress->oneStep())
{
error = true;
break;
}
if (error) break;
}
if (s_VoxFallParams.exportLossGain)
@@ -439,7 +442,7 @@ bool qVoxFallProcess::Compute(const qVoxFallDialog& dlg, QString& errorMessage,
s_VoxFallParams.isEmptyBefore.resize(voxelGrid.innerCellCount(), true);
if (s_VoxFallParams.exportBlocksAsMeshes)
{
s_VoxFallParams.clusters.resize(voxelGrid.innerCellCount(), NULL);
s_VoxFallParams.clusters.resize(voxelGrid.innerCellCount(), 0);
}
//allocate cluster ID SF