@@ -22,10 +22,6 @@ auto make_find_if_task(B first, E last, T& result, UOP predicate, P part = P())
2222 size_t W = rt.executor ().num_workers ();
2323 size_t N = std::distance (beg, end);
2424
25- if (N == 0 ) {
26- return ;
27- }
28-
2925 // only myself - no need to spawn another graph
3026 if (W <= 1 || N <= part.chunk_size ()) {
3127 part ([=, &result]() mutable { result = std::find_if (beg, end, predicate); })();
@@ -112,10 +108,6 @@ auto make_find_if_not_task(B first, E last, T& result, UOP predicate, P part = P
112108 size_t W = rt.executor ().num_workers ();
113109 size_t N = std::distance (beg, end);
114110
115- if (N == 0 ) {
116- return ;
117- }
118-
119111 // only myself - no need to spawn another graph
120112 if (W <= 1 || N <= part.chunk_size ()) {
121113 part ([=, &result] () mutable { result = std::find_if_not (beg, end, predicate); })();
@@ -201,10 +193,6 @@ auto make_min_element_task(B first, E last, T& result, C comp, P part = P()) {
201193 size_t W = rt.executor ().num_workers ();
202194 size_t N = std::distance (beg, end);
203195
204- if (N == 0 ) {
205- return ;
206- }
207-
208196 // only myself - no need to spawn another graph
209197 if (W <= 1 || N <= part.chunk_size ()) {
210198 part ([=, &result] () mutable { result = std::min_element (beg, end, comp); })();
@@ -347,10 +335,6 @@ auto make_max_element_task(B first, E last, T& result, C comp, P part = P()) {
347335 size_t W = rt.executor ().num_workers ();
348336 size_t N = std::distance (beg, end);
349337
350- if (N == 0 ) {
351- return ;
352- }
353-
354338 // only myself - no need to spawn another graph
355339 if (W <= 1 || N <= part.chunk_size ()) {
356340 part ([=, &result] () mutable { result = std::max_element (beg, end, comp); })();
0 commit comments