summaryrefslogtreecommitdiff
path: root/src/mbgl/text/get_anchors.cpp
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-05 19:04:15 +0200
commitc2899f76b68ebaa2bba61e4407e128ab261ab212 (patch)
tree873acb061104f43b2c5e47bb42c209486b8be3a6 /src/mbgl/text/get_anchors.cpp
parent27536631d01d623bb4a08c3e85f2a62a6d187a12 (diff)
downloadqtlocation-mapboxgl-upstream/alexshalamov_signed_to_unsigned_conversion.tar.gz
[core] Don't use signed int type for anchor segmentupstream/alexshalamov_signed_to_unsigned_conversion
Diffstat (limited to 'src/mbgl/text/get_anchors.cpp')
-rw-r--r--src/mbgl/text/get_anchors.cpp6
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);