From dbd6366285b23483567f2c1dc814fc9f371c4c64 Mon Sep 17 00:00:00 2001 From: gramanas Date: Mon, 20 Dec 2021 22:52:48 +0200 Subject: merge steps --- src/eval.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/eval.c') diff --git a/src/eval.c b/src/eval.c index a26cc21..8bc886a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5,17 +5,12 @@ recipe * eval(recipe * r) { if (!r) return NULL; - recipe * r1 = new_recipe(); - recipe * r2 = new_recipe(); - /* attempt to merge items (adding qtys) */ - merge_items(r1, r); - distinct_sum_items(r2, r1); - free_recipe(r1); + recipe * _r = new_recipe(); - copy_metadata(r2, r); - /* /\* Resolve step type, variables, duration and step output (if any) *\/ */ - /* finalize_steps(eve, r); */ + merge_items(_r, r); + merge_steps(_r, r); + copy_metadata(_r, r); - return r2; + return _r; } -- cgit v1.2.3