summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-11 12:12:57 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-02-11 14:34:46 +0200
commit3bd2d0e4d7d52dc88d30081922e1708f0d5a4bcf (patch)
treef2b143fc74c48283e8ad43005c4da8050bb88042 /include
parentf38330a9f58ca3b2664168c7830811055870bc42 (diff)
downloadqtlocation-mapboxgl-3bd2d0e4d7d52dc88d30081922e1708f0d5a4bcf.tar.gz
style::Style::getImage() returns optional<style::Image>
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/style/image.hpp1
-rw-r--r--include/mbgl/style/style.hpp5
2 files changed, 3 insertions, 3 deletions
diff --git a/include/mbgl/style/image.hpp b/include/mbgl/style/image.hpp
index 0d9c863e85..dd62d9e0ae 100644
--- a/include/mbgl/style/image.hpp
+++ b/include/mbgl/style/image.hpp
@@ -69,6 +69,7 @@ public:
class Impl;
Immutable<Impl> baseImpl;
+ explicit Image(Immutable<Impl> baseImpl_) : baseImpl(std::move(baseImpl_)) {}
};
} // namespace style
diff --git a/include/mbgl/style/style.hpp b/include/mbgl/style/style.hpp
index 2e47198930..c5e8d7f156 100644
--- a/include/mbgl/style/style.hpp
+++ b/include/mbgl/style/style.hpp
@@ -1,9 +1,9 @@
#pragma once
#include <mbgl/map/camera.hpp>
+#include <mbgl/style/image.hpp>
#include <mbgl/style/transition_options.hpp>
#include <mbgl/util/geo.hpp>
-#include <mbgl/util/image.hpp>
#include <mbgl/util/immutable.hpp>
#include <string>
@@ -17,7 +17,6 @@ class FileSource;
namespace style {
class Light;
-class Image;
class Source;
class Layer;
@@ -47,7 +46,7 @@ public:
void setLight(std::unique_ptr<Light>);
// Images
- const PremultipliedImage* getImage(const std::string&) const;
+ optional<Image> getImage(const std::string&) const;
void addImage(std::unique_ptr<Image>);
void removeImage(const std::string&);