From 5637418f8b3852a5467b0a7f6f201436628c50ee Mon Sep 17 00:00:00 2001 From: Hannes Roth Date: Wed, 24 Jun 2015 10:20:39 -0700 Subject: [PATCH] (Wangle) Remove unnecessary constructor argument to CollectAnyContext Summary: See title. Reviewed By: @fugalh Differential Revision: D2186833 --- folly/futures/Future-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/futures/Future-inl.h b/folly/futures/Future-inl.h index 7fdc09da..9cacf19d 100644 --- a/folly/futures/Future-inl.h +++ b/folly/futures/Future-inl.h @@ -660,12 +660,12 @@ collectAny(InputIterator first, InputIterator last) { typename std::iterator_traits::value_type::value_type T; struct CollectAnyContext { - CollectAnyContext(size_t n) {}; + CollectAnyContext() {}; Promise>> p; std::atomic done {false}; }; - auto ctx = std::make_shared(std::distance(first, last)); + auto ctx = std::make_shared(); mapSetCallback(first, last, [ctx](size_t i, Try&& t) { if (!ctx->done.exchange(true)) { ctx->p.setValue(std::make_pair(i, std::move(t))); -- 2.34.1