Commit 6f8699fc authored by Delyan Kratunov's avatar Delyan Kratunov Committed by Noam Lerner

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
parent ff7e12b6
......@@ -20,6 +20,7 @@
#include <boost/noncopyable.hpp>
#include <iostream>
#include <cmath>
#include <memory>
#include <string.h>
#include <type_traits>
#include <unistd.h>
......@@ -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<uint64_t>(1, backStep);
......
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