summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-07-02 13:28:54 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-07-08 19:46:01 +0200
commit6271f8e5466e979806415a74581fdd293930950e (patch)
tree694556d0c90003d8e5bdb0a42427f6f84d288a1e /src
parentbc41d3cf6d0b5c635f856d95acd0d4941802f51f (diff)
downloadqtlocation-mapboxgl-6271f8e5466e979806415a74581fdd293930950e.tar.gz
mark Image constructor as explicit to avoid accidental implicit argument conversion
when passing a std::string instead of an Image, the parameter gets implicitly and automatically converted (== parsed) to a temporary Image object. Since parsing an Image shouldn't be a frequent operation
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/annotation/sprite_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/annotation/sprite_parser.cpp b/src/mbgl/annotation/sprite_parser.cpp
index c5c731d517..0f9ba97c98 100644
--- a/src/mbgl/annotation/sprite_parser.cpp
+++ b/src/mbgl/annotation/sprite_parser.cpp
@@ -134,7 +134,7 @@ Sprites parseSprite(const std::string& image, const std::string& json) {
const double pixelRatio = getDouble(value, "pixelRatio", 1);
const bool sdf = getBoolean(value, "sdf", false);
- auto sprite = createSpriteImage(image, x, y, width, height, pixelRatio, sdf);
+ auto sprite = createSpriteImage(raster, x, y, width, height, pixelRatio, sdf);
if (sprite) {
sprites.emplace(name, sprite);
}