fix uninitialized variable

This commit is contained in:
viperminiq 2025-05-08 11:01:14 +02:00 committed by Nyall Dawson
parent 9a4b4d388a
commit b95fd4d757

View File

@ -422,7 +422,7 @@ void QgsKMeansClusteringAlgorithm::initClustersPlusPlus( std::vector<Feature> &p
// store distances between previous and new candidate center, error and best candidate index
double currentError = 0;
double lowestError = std::numeric_limits<double>::max();
size_t bestCandidateIndex;
unsigned int bestCandidateIndex = 0;
for ( unsigned int j = 0; j < numCandidateCenters; j++ )
{
for ( size_t z = 0; z < n; z++ )