diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-12-04 14:53:32 +0200 |
---|---|---|
committer | Tobrun <tobrun.van.nuland@gmail.com> | 2019-12-18 13:36:44 +0100 |
commit | 8e9538110a4fc7a69762f96f0d6ab08ed4c77432 (patch) | |
tree | f1da4278a7d5e7495ab45eb235597687a897d53d /src/mbgl/geometry/anchor.hpp | |
parent | 1ac3e9e9c2a8bfc731e3bba978a28562c3f083e5 (diff) | |
download | qtlocation-mapboxgl-8e9538110a4fc7a69762f96f0d6ab08ed4c77432.tar.gz |
[core] Don't use signed int type for anchor segment
Diffstat (limited to 'src/mbgl/geometry/anchor.hpp')
-rw-r--r-- | src/mbgl/geometry/anchor.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/geometry/anchor.hpp b/src/mbgl/geometry/anchor.hpp index b24d8d04e0..1a2cbd3dac 100644 --- a/src/mbgl/geometry/anchor.hpp +++ b/src/mbgl/geometry/anchor.hpp @@ -1,6 +1,7 @@ #pragma once #include <mbgl/util/geometry.hpp> +#include <mbgl/util/optional.hpp> #include <vector> @@ -11,9 +12,9 @@ public: Point<float> point; float angle = 0.0f; float scale = 0.0f; - int segment = -1; + optional<std::size_t> segment; - Anchor(float x_, float y_, float angle_, float scale_, int segment_ = -1) + Anchor(float x_, float y_, float angle_, float scale_, optional<std::size_t> segment_ = nullopt) : point(x_, y_), angle(angle_), scale(scale_), segment(segment_) {} }; |