From: Beny Luo Date: Wed, 28 Oct 2015 00:41:18 +0000 (-0700) Subject: Fix clang issue on NotificationQueue::size X-Git-Tag: deprecate-dynamic-initializer~291 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=8281c7faafe4b6ad2b92436e133d21eb0c219ab4;hp=47f0d3846c949a085da9dc3e33062b4537172edb Fix clang issue on NotificationQueue::size Summary: The implicit conversion loses integer precision: 'size_type' (aka 'unsigned long') to 'int'. Reviewed By: mzlee Differential Revision: D2585883 fb-gh-sync-id: 1fc7c84b66c8f19cc36b798dd198730764e19b28 --- diff --git a/folly/io/async/NotificationQueue.h b/folly/io/async/NotificationQueue.h index 9d76e431..9eee132b 100644 --- a/folly/io/async/NotificationQueue.h +++ b/folly/io/async/NotificationQueue.h @@ -419,7 +419,7 @@ class NotificationQueue { return true; } - int size() { + size_t size() { folly::SpinLockGuard g(spinlock_); return queue_.size(); }