summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2021-12-20 22:52:48 +0200
committergramanas <anastasis.gramm2@gmail.com>2021-12-20 22:52:48 +0200
commitdbd6366285b23483567f2c1dc814fc9f371c4c64 (patch)
tree6df025dc5e668ddc618fddde289c4c2b1025e8dd /src/eval.c
parentbf4733f991bb9e643ebc697d6f9f92b3bb6ad69c (diff)
downloadfoodtools-dbd6366285b23483567f2c1dc814fc9f371c4c64.tar.gz
foodtools-dbd6366285b23483567f2c1dc814fc9f371c4c64.tar.bz2
foodtools-dbd6366285b23483567f2c1dc814fc9f371c4c64.zip
merge steps
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c15
1 files changed, 5 insertions, 10 deletions
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;
}