summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-12-04 14:53:32 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-12-09 17:26:13 +0200
commitb6b077d73aa63160b0860fd24e144f80f428ff1d (patch)
tree3dfb37bbd219c14a262c1867f6e82f6f60758f91 /src/mbgl/geometry
parent71054c8b609f02403bf28e91c4c4ab14f1468e5d (diff)
downloadqtlocation-mapboxgl-b6b077d73aa63160b0860fd24e144f80f428ff1d.tar.gz
[core] Don't use signed int type for anchor segment
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r--src/mbgl/geometry/anchor.hpp5
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_) {}
};