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/text/get_anchors.cpp | |
parent | 1ac3e9e9c2a8bfc731e3bba978a28562c3f083e5 (diff) | |
download | qtlocation-mapboxgl-8e9538110a4fc7a69762f96f0d6ab08ed4c77432.tar.gz |
[core] Don't use signed int type for anchor segment
Diffstat (limited to 'src/mbgl/text/get_anchors.cpp')
-rw-r--r-- | src/mbgl/text/get_anchors.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp index c38e181181..a2401a020a 100644 --- a/src/mbgl/text/get_anchors.cpp +++ b/src/mbgl/text/get_anchors.cpp @@ -40,7 +40,7 @@ static Anchors resample(const GeometryCoordinates& line, assert(spacing > 0.0); - int i = 0; + std::size_t i = 0u; for (auto it = line.begin(), end = line.end() - 1; it != end; it++, i++) { const GeometryCoordinate& a = *(it); const GeometryCoordinate& b = *(it + 1); @@ -147,8 +147,8 @@ optional<Anchor> getCenterAnchor(const GeometryCoordinates& line, float prevDistance = 0; const float centerDistance = getLineLength(line) / 2; - - int i = 0; + + std::size_t i = 0u; for (auto it = line.begin(), end = line.end() - 1; it != end; it++, i++) { const GeometryCoordinate& a = *(it); const GeometryCoordinate& b = *(it + 1); |