Commit cbe8ef9d authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

Prefer std::condition_t vs preprocessor in AsyncSocket

Summary: [Folly] Prefer `std::condition_t` vs preprocessor in `AsyncSocket`.

Reviewed By: bschlinker, lnicco

Differential Revision: D22975614

fbshipit-source-id: 562d1b794ec3dbab538ad507b2ec5d0fe07c7757
parent ec55993d
...@@ -1398,13 +1398,10 @@ class AsyncSocket : public AsyncTransport { ...@@ -1398,13 +1398,10 @@ class AsyncSocket : public AsyncTransport {
// //
// Use small_vector to avoid heap allocation for up to two observers, unless // Use small_vector to avoid heap allocation for up to two observers, unless
// mobile, in which case we fallback to std::vector to prioritize code size. // mobile, in which case we fallback to std::vector to prioritize code size.
#if !FOLLY_MOBILE using LifecycleObserverVecImpl = conditional_t<
using LifecycleObserverVecImpl = !kIsMobile,
folly::small_vector<AsyncTransport::LifecycleObserver*, 2>; folly::small_vector<AsyncTransport::LifecycleObserver*, 2>,
#else std::vector<AsyncTransport::LifecycleObserver*>>;
using LifecycleObserverVecImpl =
std::vector<AsyncTransport::LifecycleObserver*>;
#endif
LifecycleObserverVecImpl lifecycleObservers_; LifecycleObserverVecImpl lifecycleObservers_;
// Pre-received data, to be returned to read callback before any data from the // Pre-received data, to be returned to read callback before any data from the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment