--- a/src/document.cpp Wed Jun 22 16:13:15 2022 +0300 +++ b/src/document.cpp Wed Jun 22 16:53:35 2022 +0300 @@ -28,12 +28,12 @@ // Make mapbox::earcut work with glm::vec3 template<> struct mapbox::util::nth<0, glm::vec3> { - static constexpr float get(const glm::vec3& t) { return t.x; }; + static constexpr float get(const glm::vec3& t) { return t.x; } }; template<> struct mapbox::util::nth<1, glm::vec3> { - static constexpr float get(const glm::vec3& t) { return t.y; }; + static constexpr float get(const glm::vec3& t) { return t.y; } }; EditTools::EditTools(QObject* parent) : @@ -46,14 +46,14 @@ { } -void EditTools::setEditMode(EditingMode mode) +void EditTools::setEditMode(EditingMode newMode) { - this->mode = mode; + this->mode = newMode; } -void EditTools::setGridMatrix(const glm::mat4& gridMatrix) +void EditTools::setGridMatrix(const glm::mat4& newGridMatrix) { - this->gridMatrix = gridMatrix; + this->gridMatrix = newGridMatrix; this->gridPlane = planeFromTriangle({ this->gridMatrix * glm::vec4{0, 0, 0, 1}, this->gridMatrix * glm::vec4{1, 0, 0, 1}, @@ -101,7 +101,7 @@ const PartRenderer* renderer) { QVector<QPointF> points2d; - points2d.reserve(worldPoints.size()); + points2d.reserve(static_cast<int>(worldPoints.size())); for (const glm::vec3& point : worldPoints) { points2d.push_back(renderer->modelToScreenCoordinates(point)); @@ -330,7 +330,7 @@ struct boundaryinfo { indextype third; std::size_t triangleid; }; std::map<indexpair, boundaryinfo> boundaries; for (std::size_t i = 0; i < indices.size(); i += 3) { - const auto add = [&](int o1, int o2, int o3){ + const auto add = [&](const std::size_t o1, const std::size_t o2, const std::size_t o3){ const auto key = std::make_pair(indices[i + o1], indices[i + o2]); boundaries[key] = {indices[i + o3], i}; };