diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-12-06 22:35:29 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-09 17:28:18 +0100 |
commit | e6799c6e336ef1e79ce4ade33db336f67b7f588b (patch) | |
tree | 26ee2c55fed5fccf58178d4bdd286710ce52a659 /src | |
parent | a115fdbe024b7336910ba58c6e4f037b68e9622f (diff) |
Remove unused function "quadraticRoots"
qbezier.cpp(122): warning #177: function "quadraticRoots" was declared but never referenced
Change-Id: I590f59ed6e41462d0a14a9239adb8bd0acbeeae4
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qbezier.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp index 2762560da7..33075b640d 100644 --- a/src/gui/painting/qbezier.cpp +++ b/src/gui/painting/qbezier.cpp @@ -119,37 +119,6 @@ QBezier QBezier::getSubRange(qreal t0, qreal t1) const return result; } -static inline int quadraticRoots(qreal a, qreal b, qreal c, - qreal *x1, qreal *x2) -{ - if (qFuzzyIsNull(a)) { - if (qFuzzyIsNull(b)) - return 0; - *x1 = *x2 = (-c / b); - return 1; - } else { - const qreal det = b * b - 4 * a * c; - if (qFuzzyIsNull(det)) { - *x1 = *x2 = -b / (2 * a); - return 1; - } - if (det > 0) { - if (qFuzzyIsNull(b)) { - *x2 = qSqrt(-c / a); - *x1 = -(*x2); - return 2; - } - const qreal stableA = b / (2 * a); - const qreal stableB = c / (a * stableA * stableA); - const qreal stableC = -1 - qSqrt(1 - stableB); - *x2 = stableA * stableC; - *x1 = (stableA * stableB) / stableC; - return 2; - } else - return 0; - } -} - void QBezier::addToPolygon(QPolygonF *polygon, qreal bezier_flattening_threshold) const { QBezier beziers[10]; |