From 32705a11e7c95295f511161b7f5ee8456c59d11a Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 14 Mar 2022 13:28:36 -0700 Subject: [PATCH] Fix loop-range-construct warnings added in newer versions of Clang. (#75) --- impeller/renderer/backend/metal/render_pass_mtl.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/impeller/renderer/backend/metal/render_pass_mtl.mm b/impeller/renderer/backend/metal/render_pass_mtl.mm index ef1dd15b1d273..77a70ebbf5d12 100644 --- a/impeller/renderer/backend/metal/render_pass_mtl.mm +++ b/impeller/renderer/backend/metal/render_pass_mtl.mm @@ -374,17 +374,17 @@ static bool Bind(PassBindingsCache& pass, auto bind_stage_resources = [&allocator, &pass_bindings]( const Bindings& bindings, ShaderStage stage) -> bool { - for (const auto buffer : bindings.buffers) { + for (const auto& buffer : bindings.buffers) { if (!Bind(pass_bindings, allocator, stage, buffer.first, buffer.second)) { return false; } } - for (const auto texture : bindings.textures) { + for (const auto& texture : bindings.textures) { if (!Bind(pass_bindings, stage, texture.first, *texture.second)) { return false; } } - for (const auto sampler : bindings.samplers) { + for (const auto& sampler : bindings.samplers) { if (!Bind(pass_bindings, stage, sampler.first, *sampler.second)) { return false; }