Remove the code after "return".

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-02-22 19:27:53 +02:00
parent a4fd71f68c
commit 67d69781f3
8 changed files with 8 additions and 36 deletions

View File

@ -382,7 +382,6 @@ QVector<QPointF> VAbstractPiece::EkvPoint(const VSAPoint &p1Line1, const VSAPoin
// The easiest, real intersection // The easiest, real intersection
points.append(CrosPoint); points.append(CrosPoint);
return points; return points;
break;
case (QLineF::UnboundedIntersection): case (QLineF::UnboundedIntersection):
{ // Most common case { // Most common case
const qreal localWidth = MaxLocalSA(p2Line1, width); const qreal localWidth = MaxLocalSA(p2Line1, width);
@ -480,7 +479,6 @@ QT_WARNING_POP
/*If we have correct lines this means lines lie on a line.*/ /*If we have correct lines this means lines lie on a line.*/
points.append(bigLine1.p2()); points.append(bigLine1.p2());
return points; return points;
break;
default: default:
break; break;
} }

View File

@ -151,17 +151,13 @@ QChar VTapeSettings::GetCSVSeparator() const
{ {
case 0: case 0:
return QChar('\t'); return QChar('\t');
break;
case 1: case 1:
return QChar(';'); return QChar(';');
break;
case 2: case 2:
return QChar(' '); return QChar(' ');
break;
case 3: case 3:
default: default:
return QChar(','); return QChar(',');
break;
} }
} }

View File

@ -403,10 +403,8 @@ inline T DialogTool::getCurrentCrossPoint(QComboBox *box) const
case 1: case 1:
case 2: case 2:
return static_cast<T>(value); return static_cast<T>(value);
break;
default: default:
return static_cast<T>(1); return static_cast<T>(1);
break;
} }
} }

View File

@ -181,7 +181,6 @@ QPointF VToolPointFromArcAndTangent::FindPoint(const QPointF &p, const VArc *arc
{ {
return p2; return p2;
} }
break;
case 1: case 1:
if (flagP1) if (flagP1)
{ {
@ -191,11 +190,9 @@ QPointF VToolPointFromArcAndTangent::FindPoint(const QPointF &p, const VArc *arc
{ {
return p2; return p2;
} }
break;
case 0: case 0:
default: default:
return QPointF(0, 0); return QPointF();
break;
} }
break; break;
@ -207,14 +204,12 @@ QPointF VToolPointFromArcAndTangent::FindPoint(const QPointF &p, const VArc *arc
} }
else else
{ {
return QPointF(0, 0); return QPointF();
} }
break;
case 3: case 3:
case 0: case 0:
default: default:
return QPointF(0, 0); return QPointF();
break;
} }
} }

View File

@ -166,15 +166,12 @@ QPointF VToolPointFromCircleAndTangent::FindPoint(const QPointF &p, const QPoint
{ {
return p2; return p2;
} }
break;
case 1: case 1:
return p1; return p1;
break;
case 3: case 3:
case 0: case 0:
default: default:
return QPointF(0, 0); return QPointF();
break;
} }
} }

View File

@ -118,10 +118,8 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF &cente
{ {
case 0: case 0:
return QPointF(); return QPointF();
break;
case 1: case 1:
return p1; return p1;
break;
case 2: case 2:
{ {
const bool flagP1 = VGObject::IsPointOnLineSegment (p1, firstPoint, secondPoint); const bool flagP1 = VGObject::IsPointOnLineSegment (p1, firstPoint, secondPoint);
@ -150,12 +148,10 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF &cente
return p2; return p2;
} }
} }
break;
} }
default: default:
qDebug() << "Unxpected value" << res; qDebug() << "Unxpected value" << res;
return QPointF(); return QPointF();
break;
} }
} }

View File

@ -188,7 +188,6 @@ QPointF VToolPointOfIntersectionArcs::FindPoint(const VArc *arc1, const VArc *ar
{ {
return p2; return p2;
} }
break;
case 1: case 1:
if (flagP1) if (flagP1)
{ {
@ -198,11 +197,9 @@ QPointF VToolPointOfIntersectionArcs::FindPoint(const VArc *arc1, const VArc *ar
{ {
return p2; return p2;
} }
break;
case 0: case 0:
default: default:
return QPointF(0, 0); return QPointF();
break;
} }
break; break;
@ -214,14 +211,12 @@ QPointF VToolPointOfIntersectionArcs::FindPoint(const VArc *arc1, const VArc *ar
} }
else else
{ {
return QPointF(0, 0); return QPointF();
} }
break;
case 3: case 3:
case 0: case 0:
default: default:
return QPointF(0, 0); return QPointF();
break;
} }
} }

View File

@ -178,15 +178,12 @@ QPointF VToolPointOfIntersectionCircles::FindPoint(const QPointF &c1Point, const
{ {
return p2; return p2;
} }
break;
case 1: case 1:
return p1; return p1;
break;
case 3: case 3:
case 0: case 0:
default: default:
return QPointF(0, 0); return QPointF();
break;
} }
} }