summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/gl/vertex_array.cpp2
-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
4 files changed, 7 insertions, 5 deletions
diff --git a/src/mbgl/gl/vertex_array.cpp b/src/mbgl/gl/vertex_array.cpp
index 831b118fce..e82e6e9765 100644
--- a/src/mbgl/gl/vertex_array.cpp
+++ b/src/mbgl/gl/vertex_array.cpp
@@ -12,6 +12,8 @@ void VertexArray::bind(Context& context,
state->indexBuffer = indexBuffer.getResource<gl::IndexBufferResource>().buffer;
state->bindings.reserve(bindings.size());
+
+ // NOLINTNEXTLINE(bugprone-too-small-loop-variable)
for (AttributeLocation location = 0; location < bindings.size(); ++location) {
if (state->bindings.size() <= location) {
state->bindings.emplace_back(context, AttributeLocation(location));
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;