From ff1046b8a239d5f7e58e2756f6b7eb8ec830ff61 Mon Sep 17 00:00:00 2001 From: Nathan Bronson Date: Fri, 19 Jul 2013 11:12:59 -0700 Subject: [PATCH] folly/MPMCQueue sizeGuess should return a signed int Summary: Like size(), sizeGuess() is allowed to return a negative value, so it should be ssize_t instead of uint64_t. Test Plan: fbmake, wait for contbuild Reviewed By: tudorb@fb.com FB internal diff: D893075 --- folly/MPMCQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/MPMCQueue.h b/folly/MPMCQueue.h index 9fb7867f..58c1d3ce 100644 --- a/folly/MPMCQueue.h +++ b/folly/MPMCQueue.h @@ -196,7 +196,7 @@ class MPMCQueue : boost::noncopyable { /// Returns is a guess at size() for contexts that don't need a precise /// value, such as stats. - uint64_t sizeGuess() const noexcept { + ssize_t sizeGuess() const noexcept { return writeCount() - readCount(); } -- 2.34.1