summaryrefslogtreecommitdiff
path: root/src/mbgl/style/image.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-12 12:32:42 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-15 08:20:18 -0700
commit8fb1a81c46f4358d731712c16868aa1108d5d34c (patch)
treef56e8f16e0c0824b0d9aab045bd234bfd7fcde45 /src/mbgl/style/image.cpp
parentb3ec985568176b077756b66754470988436d43c1 (diff)
downloadqtlocation-mapboxgl-8fb1a81c46f4358d731712c16868aa1108d5d34c.tar.gz
[core] Immutable<Impl> for Image
Diffstat (limited to 'src/mbgl/style/image.cpp')
-rw-r--r--src/mbgl/style/image.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mbgl/style/image.cpp b/src/mbgl/style/image.cpp
index c5fecec2b2..606d9907a4 100644
--- a/src/mbgl/style/image.cpp
+++ b/src/mbgl/style/image.cpp
@@ -8,11 +8,10 @@ namespace style {
Image::Image(PremultipliedImage &&image,
const float pixelRatio,
bool sdf)
- : impl(std::make_shared<Impl>(std::move(image), pixelRatio, sdf)) {
+ : impl(makeMutable<Impl>(std::move(image), pixelRatio, sdf)) {
}
-PremultipliedImage& Image::getImage() const {
- assert(impl);
+const PremultipliedImage& Image::getImage() const {
return impl->image;
}