summaryrefslogtreecommitdiff
path: root/src/mbgl/style/expression/interpolate.cpp
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2018-07-09 11:18:30 +0300
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2018-07-30 12:38:24 +0300
commit15a1c7b71f276b558f028eabae53456f444cebbc (patch)
treea4b3ada175c2e43101f75fc1ba6c7eaf27d2993f /src/mbgl/style/expression/interpolate.cpp
parentf05199e2d94a085c615aea96c867280e88a6ef6e (diff)
downloadqtlocation-mapboxgl-15a1c7b71f276b558f028eabae53456f444cebbc.tar.gz
Fix compilation errors with libc++ on QNX 7
This patch fixes the compilation errors on QNX 7: 1) QNX 7 compiler (i.e qcc based GCC 5.4.0 with libc++ from LLVM) has a limited c++11 feature support and causing the compilation errors with the inheriting constructors. This fixes the issues by providing the required constructors explicitly. 2) Resolves an ambiguous overload error with optional<T>
Diffstat (limited to 'src/mbgl/style/expression/interpolate.cpp')
-rw-r--r--src/mbgl/style/expression/interpolate.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/style/expression/interpolate.cpp b/src/mbgl/style/expression/interpolate.cpp
index 852042382c..54fbc6e1d7 100644
--- a/src/mbgl/style/expression/interpolate.cpp
+++ b/src/mbgl/style/expression/interpolate.cpp
@@ -170,23 +170,23 @@ ParseResult parseInterpolate(const Convertible& value, ParsingContext& ctx) {
labelValue->match(
[&](uint64_t n) {
if (n > std::numeric_limits<double>::max()) {
- label = {std::numeric_limits<double>::infinity()};
+ label = optional<double>{std::numeric_limits<double>::infinity()};
} else {
- label = {static_cast<double>(n)};
+ label = optional<double>{static_cast<double>(n)};
}
},
[&](int64_t n) {
if (n > std::numeric_limits<double>::max()) {
- label = {std::numeric_limits<double>::infinity()};
+ label = optional<double>{std::numeric_limits<double>::infinity()};
} else {
- label = {static_cast<double>(n)};
+ label = optional<double>{static_cast<double>(n)};
}
},
[&](double n) {
if (n > std::numeric_limits<double>::max()) {
- label = {std::numeric_limits<double>::infinity()};
+ label = optional<double>{std::numeric_limits<double>::infinity()};
} else {
- label = {static_cast<double>(n)};
+ label = optional<double>{n};
}
},
[&](const auto&) {}