From 7939811c64737b3be5fe6fd154bc239c42872182 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 19 Oct 2018 19:48:36 +0300 Subject: [PATCH] Refactoring. Removed unnecessary operations. --HG-- branch : release --- src/libs/vgeometry/vgobject.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/vgeometry/vgobject.cpp b/src/libs/vgeometry/vgobject.cpp index c2c3260de..c943342c6 100644 --- a/src/libs/vgeometry/vgobject.cpp +++ b/src/libs/vgeometry/vgobject.cpp @@ -477,9 +477,7 @@ QPointF VGObject::CorrectDistortion(const QPointF &t, const QPointF &p1, const Q { if (not VFuzzyComparePoints(p1, p2)) { - QLineF line = QLineF(p1, p2); - line.setLength(QLineF(p1, VGObject::ClosestPoint(QLineF(p1, p2), t)).length()); - return line.p2(); + return VGObject::ClosestPoint(QLineF(p1, p2), t); } else {