From 495397621dab54d91dc07204572115e1f32aea5a Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 14 Apr 2017 17:20:29 +0300 Subject: [PATCH] Fix warning "Review the data-flow - This condition might always evaluate to "true"." --HG-- branch : release --- src/libs/vgeometry/vellipticalarc.cpp | 6 +++--- .../vtools/visualization/path/vistoolcubicbezierpath.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/vgeometry/vellipticalarc.cpp b/src/libs/vgeometry/vellipticalarc.cpp index 264ac2b51..b330c9f36 100644 --- a/src/libs/vgeometry/vellipticalarc.cpp +++ b/src/libs/vgeometry/vellipticalarc.cpp @@ -300,9 +300,9 @@ int VEllipticalArc::GetQuadransRad(qreal &rad) } int n = 0; - if (rad > 0) + if (rad >= 0) { - if (rad >= 0 && rad <= M_PI_2) + if (rad <= M_PI_2) { n = 1; rad = -rad; @@ -315,7 +315,7 @@ int VEllipticalArc::GetQuadransRad(qreal &rad) } else { - if (rad <= 0 && rad >= -M_PI_2) + if (rad >= -M_PI_2) { n = 4; } diff --git a/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp b/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp index c20993fef..4e3d53f19 100644 --- a/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp +++ b/src/libs/vtools/visualization/path/vistoolcubicbezierpath.cpp @@ -283,7 +283,7 @@ void VisToolCubicBezierPath::RefreshToolTip() { Visualization::toolTip = tr("Curved path: select seven or more points"); } - else if (size >= 7 && size - VCubicBezierPath::SubSplPointsCount(countSubSpl) == 0) + else if (size - VCubicBezierPath::SubSplPointsCount(countSubSpl) == 0) { Visualization::toolTip = tr("Curved path: select seven or more points, " "Enter - finish creation");