From 727503d20565dfb21f87ed17925ab74567d4fbb8 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 14 Feb 2023 18:09:17 +0000 Subject: [PATCH] tint/resolver: Pass std::function by ref Avoids a copy Change-Id: Ief4e7985b41c50f102be27a8a3fa9a690166511f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116868 Auto-Submit: Ben Clayton Kokoro: Kokoro Commit-Queue: Dan Sinclair Reviewed-by: Dan Sinclair --- src/tint/resolver/intrinsic_table.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tint/resolver/intrinsic_table.cc b/src/tint/resolver/intrinsic_table.cc index 0cd18e8ead..7c58444216 100644 --- a/src/tint/resolver/intrinsic_table.cc +++ b/src/tint/resolver/intrinsic_table.cc @@ -1143,7 +1143,7 @@ class Impl : public IntrinsicTable { utils::VectorRef args, sem::EvaluationStage earliest_eval_stage, TemplateState templates, - OnNoMatch on_no_match) const; + const OnNoMatch& on_no_match) const; /// Evaluates the single overload for the provided argument types. /// @param overload the overload being considered @@ -1505,7 +1505,7 @@ IntrinsicPrototype Impl::MatchIntrinsic(const IntrinsicInfo& intrinsic, utils::VectorRef args, sem::EvaluationStage earliest_eval_stage, TemplateState templates, - OnNoMatch on_no_match) const { + const OnNoMatch& on_no_match) const { size_t num_matched = 0; size_t match_idx = 0; utils::Vector candidates;