From b74aeb121676f17948bb986ba8eeceb13cdcd37f Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sun, 24 Nov 2013 00:38:31 -0800 Subject: [PATCH] fix(util/lazy_list): par template missing case Signed-off-by: Leonardo de Moura --- src/util/lazy_list_fn.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/util/lazy_list_fn.h b/src/util/lazy_list_fn.h index 69991ca58..62af156db 100644 --- a/src/util/lazy_list_fn.h +++ b/src/util/lazy_list_fn.h @@ -262,12 +262,10 @@ lazy_list par(lazy_list const & l1, lazy_list const & l2, unsigned chec th2.request_interrupt(); th1.join(); th2.join(); - // TODO(Leo): check why the following commented code does not work - // if (r1 && r2) { - // lazy_list tail([=]() { return some(mk_pair(r2->first, par(r1->second, r2->second))); }); - // return some(mk_pair(r1->first, tail)); - // } else - if (r1) { + if (r1 && r2) { + lazy_list tail(r2->first, par(r1->second, r2->second)); + return some(mk_pair(r1->first, tail)); + } else if (r1) { return some(mk_pair(r1->first, par(r1->second, l2))); } else if (r2) { return some(mk_pair(r2->first, par(l1, r2->second)));