diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-12 12:32:42 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-15 08:20:18 -0700 |
commit | 8fb1a81c46f4358d731712c16868aa1108d5d34c (patch) | |
tree | f56e8f16e0c0824b0d9aab045bd234bfd7fcde45 /include | |
parent | b3ec985568176b077756b66754470988436d43c1 (diff) | |
download | qtlocation-mapboxgl-8fb1a81c46f4358d731712c16868aa1108d5d34c.tar.gz |
[core] Immutable<Impl> for Image
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/style/image.hpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/mbgl/style/image.hpp b/include/mbgl/style/image.hpp index 4abd86f1be..528b2ecb95 100644 --- a/include/mbgl/style/image.hpp +++ b/include/mbgl/style/image.hpp @@ -1,8 +1,7 @@ #pragma once #include <mbgl/util/image.hpp> - -#include <memory> +#include <mbgl/util/immutable.hpp> namespace mbgl { namespace style { @@ -11,7 +10,7 @@ class Image { public: Image(PremultipliedImage&&, float pixelRatio, bool sdf = false); - PremultipliedImage& getImage() const; + const PremultipliedImage& getImage() const; // Pixel ratio of the sprite image. float getPixelRatio() const; @@ -23,9 +22,7 @@ public: float getHeight() const; class Impl; - -private: - const std::shared_ptr<Impl> impl; + Immutable<Impl> impl; }; } // namespace style |