From 6f8699fc809889f748c2f83a9b042a497f81d32a Mon Sep 17 00:00:00 2001 From: Delyan Kratunov Date: Mon, 1 Jun 2015 21:35:34 -0700 Subject: [PATCH] Minor fix Summary: `LockFreeRingBuffer` was using `std::unique_ptr` but not importing `memory`. Also, Android NDK's libstdc++ doesn't provide `std::llround`, use straight `llround`, we don't need the constexpr-ness anyway. Test Plan: `fbmake runtests` Reviewed By: jmkaldor@fb.com Subscribers: folly-diffs@, yfeldblum, chalfant FB internal diff: D2116923 Signature: t1:2116923:1433210832:9ec0ed7f558c271a51d528b8f88fbce9b466ba3a --- folly/experimental/LockFreeRingBuffer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/folly/experimental/LockFreeRingBuffer.h b/folly/experimental/LockFreeRingBuffer.h index 87ed084e..f8dff773 100644 --- a/folly/experimental/LockFreeRingBuffer.h +++ b/folly/experimental/LockFreeRingBuffer.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -129,7 +130,7 @@ public: assert(skipFraction >= 0.0 && skipFraction <= 1.0); uint64_t ticket = ticket_.load(); - uint64_t backStep = std::llround((1.0 - skipFraction) * capacity_); + uint64_t backStep = llround((1.0 - skipFraction) * capacity_); // always try to move at least one step backward to something readable backStep = std::max(1, backStep); -- 2.34.1