Skip to content

Commit d0c5928

Browse files
chinmaygardednfield
authored andcommitted
Fix loop-range-construct warnings added in newer versions of Clang. (flutter#75)
1 parent e46345d commit d0c5928

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

impeller/renderer/backend/metal/render_pass_mtl.mm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,17 +374,17 @@ static bool Bind(PassBindingsCache& pass,
374374
auto bind_stage_resources = [&allocator, &pass_bindings](
375375
const Bindings& bindings,
376376
ShaderStage stage) -> bool {
377-
for (const auto buffer : bindings.buffers) {
377+
for (const auto& buffer : bindings.buffers) {
378378
if (!Bind(pass_bindings, allocator, stage, buffer.first, buffer.second)) {
379379
return false;
380380
}
381381
}
382-
for (const auto texture : bindings.textures) {
382+
for (const auto& texture : bindings.textures) {
383383
if (!Bind(pass_bindings, stage, texture.first, *texture.second)) {
384384
return false;
385385
}
386386
}
387-
for (const auto sampler : bindings.samplers) {
387+
for (const auto& sampler : bindings.samplers) {
388388
if (!Bind(pass_bindings, stage, sampler.first, *sampler.second)) {
389389
return false;
390390
}

0 commit comments

Comments
 (0)