diff -r 37d3c819cafa -r 2837b549e616 src/ldrawalgorithm.h --- a/src/ldrawalgorithm.h Wed Jun 22 16:13:15 2022 +0300 +++ b/src/ldrawalgorithm.h Wed Jun 22 16:53:35 2022 +0300 @@ -19,23 +19,23 @@ void makeUnofficial(ModelEditor &editor); */ - constexpr float circleAngle(int divisions, int i) + constexpr float circleAngle(unsigned int divisions, unsigned int i) { constexpr float ofs = 0.5 * pi<>; - float factor = -2.0f * pi<> / divisions; - return i * factor + ofs; + float factor = -2.0f * pi<> / static_cast(divisions); + return static_cast(i) * factor + ofs; } - constexpr glm::vec2 rimpoint(int divisions, int i) + constexpr glm::vec2 rimpoint(unsigned int divisions, unsigned int i) { const float angle = circleAngle(divisions, i); return glm::vec2{std::sin(angle), std::cos(angle)}; } template - void circleAngles(int segments, int divisions, Fn&& fn) + void circleAngles(unsigned int segments, unsigned int divisions, Fn&& fn) { - for (int i = 0; i < segments; i += 1) + for (unsigned int i = 0; i < segments; i += 1) { const float a1 = circleAngle(divisions, i - 1); const float a2 = circleAngle(divisions, i); @@ -45,7 +45,7 @@ } template - void circle(int segments, int divisions, Fn&& fn) + void circle(unsigned int segments, unsigned int divisions, Fn&& fn) { circleAngles(segments, divisions, [&fn]( const float a1,