From 8fb1a81c46f4358d731712c16868aa1108d5d34c Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 12 May 2017 12:32:42 -0700 Subject: [core] Immutable for Image --- include/mbgl/style/image.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'include') 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 - -#include +#include 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; + Immutable impl; }; } // namespace style -- cgit v1.2.1