summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-11-25 16:19:07 +0100
committerKonstantin Käfer <mail@kkaefer.com>2016-11-28 18:02:00 +0100
commit4fe071b518e792fdf069eb81ac326cf0f27f5e73 (patch)
tree692a820f2f93efa60f3cec07e2c2af35845fd6bc
parent11281d15e9c36b82dda3361c518161fb11c13ef9 (diff)
downloadqtlocation-mapboxgl-4fe071b518e792fdf069eb81ac326cf0f27f5e73.tar.gz
[build] upgrade to variant 1.1.4 and dependencies
-rw-r--r--CMakeLists.txt6
-rw-r--r--platform/darwin/src/NSExpression+MGLAdditions.mm2
-rw-r--r--platform/darwin/test/MGLFeatureTests.mm2
-rw-r--r--platform/macos/config.cmake10
-rw-r--r--platform/macos/macos.xcodeproj/project.pbxproj1
-rw-r--r--platform/qt/src/qt_conversion.hpp4
-rw-r--r--src/mbgl/annotation/annotation_tile.hpp2
-rw-r--r--src/mbgl/map/map.cpp3
-rw-r--r--test/api/annotations.test.cpp4
-rw-r--r--test/src/mbgl/test/conversion_stubs.hpp2
-rw-r--r--test/style/conversion/geojson_options.test.cpp12
-rw-r--r--test/style/filter.test.cpp6
12 files changed, 33 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6358976e6a..91e729409e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,8 +40,8 @@ if(IS_CI_BUILD)
add_compile_options(-DCI_BUILD=1)
endif()
-mason_use(geometry VERSION 0.8.0 HEADER_ONLY)
-mason_use(variant VERSION 1.1.0 HEADER_ONLY)
+mason_use(geometry VERSION 0.9.0 HEADER_ONLY)
+mason_use(variant VERSION 1.1.4 HEADER_ONLY)
mason_use(unique_resource VERSION dev HEADER_ONLY)
mason_use(rapidjson VERSION 1.1.0 HEADER_ONLY)
mason_use(boost VERSION 1.60.0 HEADER_ONLY)
@@ -51,7 +51,7 @@ mason_use(kdbush VERSION 0.1.1 HEADER_ONLY)
mason_use(earcut VERSION 0.12.1 HEADER_ONLY)
mason_use(protozero VERSION 1.4.2 HEADER_ONLY)
mason_use(pixelmatch VERSION 0.10.0 HEADER_ONLY)
-mason_use(geojson VERSION 0.3.2 HEADER_ONLY)
+mason_use(geojson VERSION 0.4.0 HEADER_ONLY)
mason_use(icu VERSION 58.1)
if(WITH_COVERAGE)
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm
index 392a6d7f5b..25a2945cfb 100644
--- a/platform/darwin/src/NSExpression+MGLAdditions.mm
+++ b/platform/darwin/src/NSExpression+MGLAdditions.mm
@@ -72,7 +72,7 @@
NSNumber *number = (NSNumber *)value;
if ((strcmp([number objCType], @encode(char)) == 0) ||
(strcmp([number objCType], @encode(BOOL)) == 0)) {
- return mbglValue.get<bool>();
+ return uint64_t(mbglValue.get<bool>());
} else if ( strcmp([number objCType], @encode(double)) == 0 ||
strcmp([number objCType], @encode(float)) == 0) {
return mbglValue.get<double>();
diff --git a/platform/darwin/test/MGLFeatureTests.mm b/platform/darwin/test/MGLFeatureTests.mm
index 7f464aaab1..66b752a73a 100644
--- a/platform/darwin/test/MGLFeatureTests.mm
+++ b/platform/darwin/test/MGLFeatureTests.mm
@@ -91,7 +91,7 @@
mbgl::Point<double> point = { -90.066667, 29.95 };
mbgl::Feature pointFeature { point };
pointFeature.id = { UINT64_MAX };
- pointFeature.properties["null"] = nullptr;
+ pointFeature.properties["null"] = mapbox::geometry::null_value;
pointFeature.properties["bool"] = true;
pointFeature.properties["unsigned int"] = UINT64_MAX;
pointFeature.properties["int"] = INT64_MIN;
diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake
index f602f79d62..1ee1eed222 100644
--- a/platform/macos/config.cmake
+++ b/platform/macos/config.cmake
@@ -82,6 +82,8 @@ endmacro()
macro(mbgl_platform_render)
+ set_xcode_property(mbgl-render GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
target_link_libraries(mbgl-render
PRIVATE mbgl-loop
PRIVATE "-framework Foundation"
@@ -95,6 +97,8 @@ endmacro()
macro(mbgl_platform_offline)
+ set_xcode_property(mbgl-offline GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
target_link_libraries(mbgl-offline
PRIVATE mbgl-loop
PRIVATE "-framework Foundation"
@@ -108,6 +112,8 @@ endmacro()
macro(mbgl_platform_test)
+ set_xcode_property(mbgl-test GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
target_sources(mbgl-test
PRIVATE test/src/main.cpp
)
@@ -130,6 +136,8 @@ macro(mbgl_platform_test)
endmacro()
macro(mbgl_platform_benchmark)
+ set_xcode_property(mbgl-benchmark GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
target_sources(mbgl-benchmark
PRIVATE benchmark/src/main.cpp
)
@@ -152,6 +160,8 @@ macro(mbgl_platform_benchmark)
endmacro()
macro(mbgl_platform_node)
+ set_xcode_property(mbgl-node GCC_SYMBOLS_PRIVATE_EXTERN YES)
+
target_link_libraries(mbgl-node
PRIVATE "-framework Foundation"
PRIVATE "-framework OpenGL"
diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj
index 8528ed0be9..b38883e911 100644
--- a/platform/macos/macos.xcodeproj/project.pbxproj
+++ b/platform/macos/macos.xcodeproj/project.pbxproj
@@ -1461,6 +1461,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
+ GCC_SYMBOLS_PRIVATE_EXTERN = YES;
HEADER_SEARCH_PATHS = (
"$(mbgl_core_INCLUDE_DIRECTORIES)",
"$(mbgl_loop_INCLUDE_DIRECTORIES)",
diff --git a/platform/qt/src/qt_conversion.hpp b/platform/qt/src/qt_conversion.hpp
index acb7ed7d54..e49b6dbe3e 100644
--- a/platform/qt/src/qt_conversion.hpp
+++ b/platform/qt/src/qt_conversion.hpp
@@ -94,9 +94,9 @@ inline optional<Value> toValue(const QVariant& value) {
} else if (value.type() == QVariant::Color) {
return { value.value<QColor>().name().toStdString() };
} else if (value.type() == QVariant::Int) {
- return { value.toInt() };
+ return { int64_t(value.toInt()) };
} else if (value.canConvert(QVariant::Double)) {
- return { value.toFloat() };
+ return { value.toDouble() };
} else {
return {};
}
diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp
index d43ec82d38..bf73075992 100644
--- a/src/mbgl/annotation/annotation_tile.hpp
+++ b/src/mbgl/annotation/annotation_tile.hpp
@@ -31,7 +31,7 @@ public:
FeatureType getType() const override { return type; }
optional<Value> getValue(const std::string&) const override;
- optional<FeatureIdentifier> getID() const override { return { id }; }
+ optional<FeatureIdentifier> getID() const override { return { static_cast<uint64_t>(id) }; }
GeometryCollection getGeometries() const override { return geometries; }
const AnnotationID id;
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 3b8758f987..8577002c04 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -825,7 +825,8 @@ AnnotationIDs Map::queryPointAnnotations(const ScreenBox& box) {
std::set<AnnotationID> set;
for (auto &feature : features) {
assert(feature.id);
- assert(*feature.id <= std::numeric_limits<AnnotationID>::max());
+ assert(feature.id->is<uint64_t>());
+ assert(feature.id->get<uint64_t>() <= std::numeric_limits<AnnotationID>::max());
set.insert(static_cast<AnnotationID>(feature.id->get<uint64_t>()));
}
AnnotationIDs ids;
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index a56992bc28..31277718da 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -340,12 +340,12 @@ TEST(Annotations, QueryRenderedFeatures) {
auto features = test.map.queryRenderedFeatures(test.map.pixelForLatLng({ 0, 0 }));
EXPECT_EQ(features.size(), 1u);
EXPECT_TRUE(!!features[0].id);
- EXPECT_EQ(*features[0].id, 0);
+ EXPECT_EQ(*features[0].id, uint64_t(0));
auto features2 = test.map.queryRenderedFeatures(test.map.pixelForLatLng({ 50, 0 }));
EXPECT_EQ(features2.size(), 1u);
EXPECT_TRUE(!!features2[0].id);
- EXPECT_EQ(*features2[0].id, 1);
+ EXPECT_EQ(*features2[0].id, uint64_t(1));
}
TEST(Annotations, QueryFractionalZoomLevels) {
diff --git a/test/src/mbgl/test/conversion_stubs.hpp b/test/src/mbgl/test/conversion_stubs.hpp
index b80a2c98bd..ddffb1e3b2 100644
--- a/test/src/mbgl/test/conversion_stubs.hpp
+++ b/test/src/mbgl/test/conversion_stubs.hpp
@@ -104,7 +104,7 @@ inline optional<mbgl::Value> toValue(const Value& value) {
} else if (value.is<std::string>()) {
return { value.get<std::string>() };
} else if (value.is<float>()) {
- return { value.get<float>() };
+ return { double(value.get<float>()) };
} else {
return {};
}
diff --git a/test/style/conversion/geojson_options.test.cpp b/test/style/conversion/geojson_options.test.cpp
index dc9be237a8..14a7adbba7 100644
--- a/test/style/conversion/geojson_options.test.cpp
+++ b/test/style/conversion/geojson_options.test.cpp
@@ -17,7 +17,7 @@ TEST(GeoJSONOptions, Basic) {
}
TEST(GeoJSONOptions, ErrorHandling) {
- ValueMap map {{"maxzoom", "should not be a string"}};
+ ValueMap map {{"maxzoom", std::string{"should not be a string"}}};
Value raw(map);
Result<GeoJSONOptions> converted = convert<GeoJSONOptions>(raw);
ASSERT_FALSE((bool) converted);
@@ -44,14 +44,14 @@ TEST(GeoJSONOptions, RetainsDefaults) {
TEST(GeoJSONOptions, FullConversion) {
ValueMap map {
//GeoJSON-VT
- {"maxzoom", 1},
- {"buffer", 2},
- {"tolerance", 3},
+ {"maxzoom", 1.0f},
+ {"buffer", 2.0f},
+ {"tolerance", 3.0f},
//Supercluster
{"cluster", true},
- {"clusterRadius", 4},
- {"clusterMaxZoom", 5}
+ {"clusterRadius", 4.0f},
+ {"clusterMaxZoom", 5.0f}
};
Value raw(map);
GeoJSONOptions converted = *convert<GeoJSONOptions>(raw);
diff --git a/test/style/filter.test.cpp b/test/style/filter.test.cpp
index b49f424a39..33b64978f5 100644
--- a/test/style/filter.test.cpp
+++ b/test/style/filter.test.cpp
@@ -42,7 +42,7 @@ TEST(Filter, EqualsNumber) {
ASSERT_FALSE(f(feature({{ "foo", std::string("0") }})));
ASSERT_FALSE(f(feature({{ "foo", false }})));
ASSERT_FALSE(f(feature({{ "foo", true }})));
- ASSERT_FALSE(f(feature({{ "foo", nullptr }})));
+ ASSERT_FALSE(f(feature({{ "foo", mapbox::geometry::null_value }})));
ASSERT_FALSE(f(feature({{}})));
}
@@ -113,13 +113,13 @@ TEST(Filter, NotHas) {
TEST(Filter, ID) {
Feature feature1 { Point<double>() };
- feature1.id = { 1234 };
+ feature1.id = { uint64_t(1234) };
ASSERT_TRUE(parse("[\"==\", \"$id\", 1234]")(feature1));
ASSERT_FALSE(parse("[\"==\", \"$id\", \"1234\"]")(feature1));
Feature feature2 { Point<double>() };
- feature2.properties["id"] = { 1234 };
+ feature2.properties["id"] = { uint64_t(1234) };
ASSERT_FALSE(parse("[\"==\", \"$id\", 1234]")(feature2));
}