Mercurial > hg > orthanc-stone
diff OrthancStone/Sources/Toolbox/DicomStructureSet.cpp @ 1916:bd527bbc34df
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 20 Mar 2022 18:23:39 +0100 |
parents | f81cdf283859 |
children | 98952be6fb97 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Sun Mar 20 18:07:11 2022 +0100 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Sun Mar 20 18:23:39 2022 +0100 @@ -917,11 +917,11 @@ Vector normal; bool valid = false; - for (size_t i = 0; i + 2 < points.size(); i++) + for (size_t j = 0; j + 2 < points.size(); j++) { - const Vector& a = points[i]; - const Vector& b = points[i + 1]; - const Vector& c = points[i + 2]; + const Vector& a = points[j]; + const Vector& b = points[j + 1]; + const Vector& c = points[j + 2]; LinearAlgebra::CrossProduct(normal, b - a, c - a); // (*) LinearAlgebra::NormalizeVector(normal); @@ -937,9 +937,9 @@ // Check that all the points of the polygon lie in the plane defined by the normal double d1 = GeometryToolbox::ProjectAlongNormal(points[0], normal); - for (size_t i = 1; i < points.size(); i++) + for (size_t j = 1; j < points.size(); j++) { - double d2 = GeometryToolbox::ProjectAlongNormal(points[i], normal); + double d2 = GeometryToolbox::ProjectAlongNormal(points[j], normal); if (!LinearAlgebra::IsNear(d1, d2)) {