Needless temporary gone
authorPraveen Kumar <cpp.fool@gmail.com>
Fri, 12 Jun 2015 21:44:14 +0000 (14:44 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 12 Jun 2015 21:54:35 +0000 (14:54 -0700)
commitaf7afa42b2bf703a9dc9642a4fe8bb350da3bc87
tree1f6fb1503d01f18e8aa708a2877b96503aaac7f8
parent143b92ee0d22b6dd70e07f4115687ff6a04e0f50
Needless temporary gone

Summary: We might be doing:
1) Create a temporary
2) Copy/Move out of it
3) Destroy that temporary.
Which isn't needed in many places.
And copy/move elision doesn't work for a temporary
bound to a reference.

We can forward arguments, directly.
To get the work done three constructors were added.

Closes #222

Reviewed By: @JoelMarcey, @yfeldblum

Differential Revision: D2151731

Pulled By: @sgolemon
13 files changed:
folly/Subprocess.cpp
folly/Subprocess.h
folly/experimental/JSONSchema.cpp
folly/experimental/fibers/SimpleLoopController.h
folly/experimental/fibers/test/FibersTest.cpp
folly/experimental/test/EventCountTest.cpp
folly/futures/Future-inl.h
folly/io/async/SSLContext.h
folly/io/async/test/EventBaseTest.cpp
folly/test/DeterministicSchedule.cpp
folly/test/DynamicTest.cpp
folly/wangle/ssl/SSLContextConfig.h
folly/wangle/ssl/SSLSessionCacheManager.cpp