diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-05-31 11:53:04 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-06-01 15:38:01 -0700 |
commit | 8b37a0704c7c20b1664fee3dfcc79139982a1ce7 (patch) | |
tree | 9c0a50330b7e4f152a3a9ee25685fcbe8b9a4df4 /src/mbgl/style/sources/image_source_impl.hpp | |
parent | 843da07b28a840fd850056c4b15d492ccc76a646 (diff) | |
download | qtlocation-mapboxgl-8b37a0704c7c20b1664fee3dfcc79139982a1ce7.tar.gz |
[core] Use fixed-size std::array for ImageSource coordinates
Diffstat (limited to 'src/mbgl/style/sources/image_source_impl.hpp')
-rw-r--r-- | src/mbgl/style/sources/image_source_impl.hpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mbgl/style/sources/image_source_impl.hpp b/src/mbgl/style/sources/image_source_impl.hpp index 26f025db74..5fd41ac6e6 100644 --- a/src/mbgl/style/sources/image_source_impl.hpp +++ b/src/mbgl/style/sources/image_source_impl.hpp @@ -3,28 +3,27 @@ #include <mbgl/style/source_impl.hpp> #include <mbgl/style/sources/image_source.hpp> #include <mbgl/util/image.hpp> +#include <mbgl/util/geo.hpp> namespace mbgl { -class LatLng; namespace style { class ImageSource::Impl : public Source::Impl { public: - Impl(std::string id, std::vector<LatLng> coords); - Impl(const Impl& rhs, std::vector<LatLng> coords); + Impl(std::string id, std::array<LatLng, 4> coords); + Impl(const Impl& rhs, std::array<LatLng, 4> coords); Impl(const Impl& rhs, UnassociatedImage image); ~Impl() final; - void setImage(UnassociatedImage&& ); - const mbgl::UnassociatedImage& getImage() const; - std::vector<LatLng> getCoordinates() const; + const UnassociatedImage& getImage() const; + std::array<LatLng, 4> getCoordinates() const; optional<std::string> getAttribution() const final; private: - std::vector<LatLng> coords; - mbgl::UnassociatedImage image; + std::array<LatLng, 4> coords; + UnassociatedImage image; }; } // namespace style |