summaryrefslogtreecommitdiff
path: root/platform
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 /platform
parent11281d15e9c36b82dda3361c518161fb11c13ef9 (diff)
downloadqtlocation-mapboxgl-4fe071b518e792fdf069eb81ac326cf0f27f5e73.tar.gz
[build] upgrade to variant 1.1.4 and dependencies
Diffstat (limited to 'platform')
-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
5 files changed, 15 insertions, 4 deletions
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 {};
}