From: Delyan Kratunov Date: Tue, 2 Jun 2015 04:35:34 +0000 (-0700) Subject: Minor fix X-Git-Tag: v0.42.0~5 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6f8699fc809889f748c2f83a9b042a497f81d32a;p=folly.git 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 --- 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);