From: Hannes Roth Date: Wed, 24 Jun 2015 17:20:39 +0000 (-0700) Subject: (Wangle) Remove unnecessary constructor argument to CollectAnyContext X-Git-Tag: v0.48.0~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5637418f8b3852a5467b0a7f6f201436628c50ee;p=folly.git (Wangle) Remove unnecessary constructor argument to CollectAnyContext Summary: See title. Reviewed By: @fugalh Differential Revision: D2186833 --- 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)));