[msvc] Fix warnings, mainly casting to smaller types (#270)

If the checks by GitHub Actions checks are met, then it seems good to go.  Thanks for supporting FOSS4G!
This commit is contained in:
Tadej Novak
2022-04-22 20:40:55 +02:00
committed by GitHub
parent cf41e113f9
commit 32ed70c95d
121 changed files with 645 additions and 459 deletions

View File

@@ -784,7 +784,7 @@ void NativeMapView::addAnnotationIcon(JNIEnv& env, const jni::String& symbol, ji
jni::GetArrayRegion(env, *jpixels, 0, size, reinterpret_cast<jbyte*>(premultipliedImage.data.get()));
map->addAnnotationImage(std::make_unique<mbgl::style::Image>(
symbolName, std::move(premultipliedImage), float(scale)));
symbolName, std::move(premultipliedImage), static_cast<float>(scale)));
}
void NativeMapView::removeAnnotationIcon(JNIEnv& env, const jni::String& symbol) {
@@ -1097,7 +1097,7 @@ void NativeMapView::addImage(JNIEnv& env, const jni::String& name, const jni::Ob
map->getStyle().addImage(std::make_unique<mbgl::style::Image>(
jni::Make<std::string>(env, name),
std::move(premultipliedImage),
float(scale),
static_cast<float>(scale),
sdf)
);
}