[core] change std::array<uint16_t, 2> to mbgl::Size

This commit is contained in:
Konstantin Käfer
2016-10-26 15:22:31 -07:00
parent ef8017198c
commit 62b56b799a
72 changed files with 461 additions and 431 deletions

View File

@@ -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");
}