summaryrefslogtreecommitdiff
path: root/platform/android/src/jni.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-26 15:22:31 -0700
committerKonstantin Käfer <mail@kkaefer.com>2016-10-27 18:30:58 -0700
commit62b56b799a7d4fcd1a8f151eed878054b862da5b (patch)
tree34d510a69f9dd1bca30e9b137feffbd1eb6495d0 /platform/android/src/jni.cpp
parentef8017198ce8f0bd79ba5a5ed31e35a16e3433bb (diff)
downloadqtlocation-mapboxgl-62b56b799a7d4fcd1a8f151eed878054b862da5b.tar.gz
[core] change std::array<uint16_t, 2> to mbgl::Size
Diffstat (limited to 'platform/android/src/jni.cpp')
-rwxr-xr-xplatform/android/src/jni.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp
index 6dcd177cd6..01d3a01227 100755
--- a/platform/android/src/jni.cpp
+++ b/platform/android/src/jni.cpp
@@ -833,9 +833,10 @@ void nativeAddAnnotationIcon(JNIEnv *env, jni::jobject* obj, jlong nativeMapView
NullCheck(*env, jpixels);
std::size_t size = jni::GetArrayLength(*env, *jpixels);
- mbgl::PremultipliedImage premultipliedImage(width, height);
+ mbgl::PremultipliedImage premultipliedImage(
+ { static_cast<uint32_t>(width), static_cast<uint32_t>(height) });
- if (premultipliedImage.size() != uint32_t(size)) {
+ if (premultipliedImage.bytes() != uint32_t(size)) {
throw mbgl::util::SpriteImageException("Sprite image pixel count mismatch");
}
@@ -1162,9 +1163,10 @@ void nativeAddImage(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jni:
// Create Pre-multiplied image from byte[]
NullCheck(*env, data);
std::size_t size = jni::GetArrayLength(*env, *data);
- mbgl::PremultipliedImage premultipliedImage(width, height);
+ mbgl::PremultipliedImage premultipliedImage(
+ { static_cast<uint32_t>(width), static_cast<uint32_t>(height) });
- if (premultipliedImage.size() != uint32_t(size)) {
+ if (premultipliedImage.bytes() != uint32_t(size)) {
throw mbgl::util::SpriteImageException("Sprite image pixel count mismatch");
}