summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-27 18:20:33 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-30 23:37:44 +0300
commitb4e9c0bd119a154f45827d1a62ebaf8407758779 (patch)
tree96e7a2948f28740bd68ade0dbaa8354b75a5afa7 /src/mbgl/renderer
parent31338c5d88264422da7ac1d2e8672b3ef45b54b0 (diff)
downloadqtlocation-mapboxgl-b4e9c0bd119a154f45827d1a62ebaf8407758779.tar.gz
[core] Fix bugprone-too-small-loop-variable errors
As reported by clang-tidy-8.
Diffstat (limited to 'src/mbgl/renderer')
-rw-r--r--src/mbgl/renderer/buckets/fill_bucket.cpp4
-rw-r--r--src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp4
-rw-r--r--src/mbgl/renderer/render_orchestrator.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/renderer/buckets/fill_bucket.cpp b/src/mbgl/renderer/buckets/fill_bucket.cpp
index 4257d5ca6e..8a66486a58 100644
--- a/src/mbgl/renderer/buckets/fill_bucket.cpp
+++ b/src/mbgl/renderer/buckets/fill_bucket.cpp
@@ -80,7 +80,7 @@ void FillBucket::addFeature(const GeometryTileFeature& feature,
vertices.emplace_back(FillProgram::layoutVertex(ring[0]));
lines.emplace_back(lineIndex + nVertices - 1, lineIndex);
- for (uint32_t i = 1; i < nVertices; i++) {
+ for (std::size_t i = 1; i < nVertices; i++) {
vertices.emplace_back(FillProgram::layoutVertex(ring[i]));
lines.emplace_back(lineIndex + i - 1, lineIndex + i);
}
@@ -102,7 +102,7 @@ void FillBucket::addFeature(const GeometryTileFeature& feature,
assert(triangleSegment.vertexLength <= std::numeric_limits<uint16_t>::max());
uint16_t triangleIndex = triangleSegment.vertexLength;
- for (uint32_t i = 0; i < nIndicies; i += 3) {
+ for (std::size_t i = 0; i < nIndicies; i += 3) {
triangles.emplace_back(triangleIndex + indices[i],
triangleIndex + indices[i + 1],
triangleIndex + indices[i + 2]);
diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
index 39c9f9af1e..46724e31e6 100644
--- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
+++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
@@ -96,7 +96,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature,
std::size_t edgeDistance = 0;
- for (uint32_t i = 0; i < nVertices; i++) {
+ for (std::size_t i = 0; i < nVertices; i++) {
const auto& p1 = ring[i];
vertices.emplace_back(
@@ -147,7 +147,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature,
std::size_t nIndices = indices.size();
assert(nIndices % 3 == 0);
- for (uint32_t i = 0; i < nIndices; i += 3) {
+ for (std::size_t i = 0; i < nIndices; i += 3) {
// Counter-Clockwise winding order.
triangles.emplace_back(flatIndices[indices[i]], flatIndices[indices[i + 2]],
flatIndices[indices[i + 1]]);
diff --git a/src/mbgl/renderer/render_orchestrator.cpp b/src/mbgl/renderer/render_orchestrator.cpp
index 8c8cd4a0ea..921b764e2d 100644
--- a/src/mbgl/renderer/render_orchestrator.cpp
+++ b/src/mbgl/renderer/render_orchestrator.cpp
@@ -305,7 +305,7 @@ std::unique_ptr<RenderTree> RenderOrchestrator::createRenderTree(
bool sourceNeedsRendering = false;
bool sourceNeedsRelayout = false;
- for (uint32_t index = 0u; index < orderedLayers.size(); ++index) {
+ for (std::size_t index = 0; index < orderedLayers.size(); ++index) {
RenderLayer& layer = orderedLayers[index];
const auto* layerInfo = layer.baseImpl->getTypeInfo();
const bool layerIsVisible = layer.baseImpl->visibility != style::VisibilityType::None;