summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-12-20 14:53:22 -0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2017-01-24 11:36:59 +0200
commitfac44fb93c40517a401bb139a1c1861f000ceff0 (patch)
tree06b59c23fd56ad03a6d0f2af88a022ef8dfe8b2f
parentc3c730d17c94630d1a531950d98fd4c4d9770472 (diff)
downloadqtlocation-mapboxgl-fac44fb93c40517a401bb139a1c1861f000ceff0.tar.gz
[gcc4.9] Make geojson.cpp GCC4.9 compatible
-rw-r--r--src/3rd_party/geojson-cpp/include/mapbox/geojson_impl.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/3rd_party/geojson-cpp/include/mapbox/geojson_impl.hpp b/src/3rd_party/geojson-cpp/include/mapbox/geojson_impl.hpp
index 2ffd420dbb..45021d432d 100644
--- a/src/3rd_party/geojson-cpp/include/mapbox/geojson_impl.hpp
+++ b/src/3rd_party/geojson-cpp/include/mapbox/geojson_impl.hpp
@@ -162,7 +162,12 @@ feature convert<feature>(const rapidjson_value &json) {
if (geom_itr == json_end)
throw error("Feature must have a geometry property");
+#if !defined(__GNUC__) || __GNUC__ >= 5
feature result{ convert<geometry>(geom_itr->value) };
+#else
+ feature result;
+ result.geometry = convert<geometry>(geom_itr->value);
+#endif
auto const &id_itr = json.FindMember("id");
if (id_itr != json_end) {