diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-07-02 13:28:54 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-07-08 19:46:01 +0200 |
commit | 6271f8e5466e979806415a74581fdd293930950e (patch) | |
tree | 694556d0c90003d8e5bdb0a42427f6f84d288a1e /src | |
parent | bc41d3cf6d0b5c635f856d95acd0d4941802f51f (diff) | |
download | qtlocation-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.cpp | 2 |
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); } |