From 789dbd170fb1d61e9720a057f146f86ec908186c Mon Sep 17 00:00:00 2001 From: Hannes Roth Date: Tue, 2 Jun 2015 10:09:46 -0700 Subject: [PATCH] (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 --- folly/futures/detail/Core.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 -- 2.34.1