From e43a784dc89030941b0cc43309541970c59a723c Mon Sep 17 00:00:00 2001 From: David Faust Date: Mon, 13 Dec 2021 12:53:26 -0800 Subject: Get rid of lambdas with AST::ArrayElemsValues These constructs make working with the IR needlessly complicated for static analysis. Replace with simple for loops, and delete the old ArrayElemsValues::iterate () method. Fixes: #720 --- gcc/rust/ast/rust-expr.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gcc/rust/ast') diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h index 3463f5a..7f6714a 100644 --- a/gcc/rust/ast/rust-expr.h +++ b/gcc/rust/ast/rust-expr.h @@ -996,15 +996,6 @@ public: size_t get_num_values () const { return values.size (); } - void iterate (std::function cb) - { - for (auto it = values.begin (); it != values.end (); it++) - { - if (!cb ((*it).get ())) - return; - } - } - protected: ArrayElemsValues *clone_array_elems_impl () const override { -- cgit v1.1