summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-07 14:08:42 (GMT)
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-12 17:42:29 (GMT)
commit1aacc88f350d2d54337cdacb1a653785c759586b (patch)
tree611bb88c9499e6ac00ec963c731b9be0f4d5ef92 /include
parent8af593f89c4686226171167f101694823e1a14f0 (diff)
downloadqtlocation-mapboxgl-1aacc88f350d2d54337cdacb1a653785c759586b.tar.gz
[core] GCC 4.9 does not allow using another member in a constexpr ctor
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/util/unitbezier.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mbgl/util/unitbezier.hpp b/include/mbgl/util/unitbezier.hpp
index 3a49949..6e644e2 100644
--- a/include/mbgl/util/unitbezier.hpp
+++ b/include/mbgl/util/unitbezier.hpp
@@ -34,11 +34,11 @@ struct UnitBezier {
// Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).
constexpr UnitBezier(double p1x, double p1y, double p2x, double p2y)
: cx(3.0 * p1x)
- , bx(3.0 * (p2x - p1x) - cx)
- , ax(1.0 - cx - bx)
+ , bx(3.0 * (p2x - p1x) - (3.0 * p1x))
+ , ax(1.0 - (3.0 * p1x) - (3.0 * (p2x - p1x) - (3.0 * p1x)))
, cy(3.0 * p1y)
- , by(3.0 * (p2y - p1y) - cy)
- , ay(1.0 - cy - by) {
+ , by(3.0 * (p2y - p1y) - (3.0 * p1y))
+ , ay(1.0 - (3.0 * p1y) - (3.0 * (p2y - p1y) - (3.0 * p1y))) {
}
double sampleCurveX(double t) const {