From: Hannes Roth <hannesr@fb.com> Date: Tue, 2 Jun 2015 17:09:46 +0000 (-0700) Subject: (Wangle) Don't use std::bind in Core X-Git-Tag: v0.42.0~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=789dbd170fb1d61e9720a057f146f86ec908186c;p=folly.git (Wangle) Don't use std::bind in Core Summary: Seems like an unnecessary indirection that might make it harder to for the compiler to inline everything (if that's even possible with `std::bind`)? Test Plan: Run all the tests. Reviewed By: hans@fb.com Subscribers: folly-diffs@, jsedgwick, yfeldblum, chalfant FB internal diff: D2115032 Signature: t1:2115032:1433182233:3938d0498cad50df32c8b6ee4536de14ae5fd006 --- diff --git a/folly/futures/detail/Core.h b/folly/futures/detail/Core.h index 708d28a6..34d0a725 100644 --- a/folly/futures/detail/Core.h +++ b/folly/futures/detail/Core.h @@ -271,8 +271,7 @@ class Core { FSM_START(fsm_) case State::Armed: if (active_) { - FSM_UPDATE2(fsm_, State::Done, []{}, - std::bind(&Core::doCallback, this)); + FSM_UPDATE2(fsm_, State::Done, []{}, [this]{ this->doCallback(); }); } FSM_BREAK