Summary:
Since `folly::RequestContext::get()` returns raw pointer, it could directly use the reference returned by `getStaticContext()`
I don't expect this to make much of a difference, just tiny improvements
Reviewed By: yfeldblum
Differential Revision:
D6153353
fbshipit-source-id:
1c41d4fc259aa5cb3e69e50ed24bed1ba9caf6c3
}
RequestContext* RequestContext::get() {
- auto context = getStaticContext();
+ auto& context = getStaticContext();
if (!context) {
static RequestContext defaultContext;
return std::addressof(defaultContext);