Commit dd6de596 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[ir2cabs] tiny refactoring (use List.fold_left instead of manual list unroll)

parent f778ff36
Pipeline #44153 failed with stages
......@@ -1853,12 +1853,10 @@ and make_assign_cap env cap =
(* For a given lambda instance, initialize all overloaded call operators. *)
and init_lambda_overloads env aux lam_name lam_type overloads closures =
match overloads with
| [] -> (env, aux)
| ovl::overloads ->
let (env, aux) =
init_lambda_single_overload env aux lam_name lam_type ovl closures in
init_lambda_overloads env aux lam_name lam_type overloads closures
let init_one (env, aux) ovl =
init_lambda_single_overload env aux lam_name lam_type ovl closures
in
List.fold_left init_one (env,aux) overloads
(* For a given lambda instance, initialize one overloaded call operator.
This is called once for a C++11 lambda and once or more for a C++14 generic
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment