diff options
author | Sudarsana Babu Nagineni <sudarsana.babu@mapbox.com> | 2018-07-09 11:18:30 +0300 |
---|---|---|
committer | Sudarsana Babu Nagineni <sudarsana.babu@mapbox.com> | 2018-07-20 00:31:11 +0300 |
commit | 921e17148a05931828594a4fcf8519195decb3cb (patch) | |
tree | 8cced87f82c14e30d90b077bb17331f508b65cb6 /src/mbgl/style/expression/interpolate.cpp | |
parent | 5d7e3e24e565afffe2bc9db5029286b167f039ed (diff) | |
download | qtlocation-mapboxgl-upstream/qnx_erros.tar.gz |
Fix compilation errors with libc++ on QNX 7upstream/qnx_erros
This patch fixes the compilation errors on QNX 7:
1) It seems that the 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. Fix the issues by providing the
required constructors explicitly.
2) Resolve an ambiguous overload error with optional<T>
3) Remove use of noncopyable in Context
Diffstat (limited to 'src/mbgl/style/expression/interpolate.cpp')
-rw-r--r-- | src/mbgl/style/expression/interpolate.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/style/expression/interpolate.cpp b/src/mbgl/style/expression/interpolate.cpp index a9bb3bf05e..31fd360fa9 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&) {} |