17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 01:39:20 +02:00

fix(sonar): addressing reliability/security issues (#202)

This commit is contained in:
jerrrrycho
2026-10-04 20:00:13 +02:00
committed by GitHub
parent 51521a135a
commit 79bd0c8e91
36 changed files with 254 additions and 246 deletions

View File

@@ -294,7 +294,7 @@ TSegment::find_nearest_point( glm::dvec3 const &Point ) const {
else {
// for curves iterate through segment chunks, and find the one which gives us the least distance to the specified point
double distance = std::numeric_limits<double>::max();
double nearest;
double nearest { 0.0 };
// NOTE: we're reusing already created segment chunks, which are created based on splinefidelity setting
// this means depending on splinefidelity the results can be potentially slightly different
for( int segmentidx = 0; segmentidx < iSegCount; ++segmentidx ) {