[msvc] Avoid warnings in tests (#276)
This commit is contained in:
@@ -21,7 +21,7 @@ PremultipliedImage namedImage(const std::string& name) {
|
||||
}
|
||||
|
||||
std::unique_ptr<style::Image> namedMarker(const std::string& name) {
|
||||
return std::make_unique<style::Image>(name, namedImage(name), 1.0);
|
||||
return std::make_unique<style::Image>(name, namedImage(name), 1.0f);
|
||||
}
|
||||
|
||||
class AnnotationTest {
|
||||
@@ -340,7 +340,7 @@ TEST(Annotations, ReaddImage) {
|
||||
|
||||
test.frontend.render(test.map);
|
||||
|
||||
test.map.addAnnotationImage(std::make_unique<style::Image>("default_marker", namedImage("flipped_marker"), 1.0));
|
||||
test.map.addAnnotationImage(std::make_unique<style::Image>("default_marker", namedImage("flipped_marker"), 1.0f));
|
||||
test.checkRendering("readd_image");
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
QueryTest() {
|
||||
map.getStyle().loadJSON(util::read_file("test/fixtures/api/query_style.json"));
|
||||
map.getStyle().addImage(std::make_unique<style::Image>("test-icon",
|
||||
decodeImage(util::read_file("test/fixtures/sprites/default_marker.png")), 1.0));
|
||||
decodeImage(util::read_file("test/fixtures/sprites/default_marker.png")), 1.0f));
|
||||
|
||||
frontend.render(map);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ TEST(API, RecycleMapUpdateImages) {
|
||||
map->getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json"));
|
||||
map->getStyle().addSource(std::move(source));
|
||||
map->getStyle().addLayer(std::move(layer));
|
||||
map->getStyle().addImage(std::make_unique<style::Image>(markerName, decodeImage(util::read_file(markerPath)), 1.0));
|
||||
map->getStyle().addImage(std::make_unique<style::Image>(markerName, decodeImage(util::read_file(markerPath)), 1.0f));
|
||||
};
|
||||
|
||||
// default marker
|
||||
|
||||
Reference in New Issue
Block a user