Trivial argument rename in MPMCQueue
authorBrian Watling <bwatling@fb.com>
Wed, 27 Nov 2013 21:31:51 +0000 (13:31 -0800)
committerJordan DeLong <jdelong@fb.com>
Fri, 20 Dec 2013 21:02:43 +0000 (13:02 -0800)
Summary: Rename the 'capacity' argument so g++ will not complain when -Wshadow is enabled ('capacity' is also a method on MPMCQueue)

Test Plan: compiles, unit tests pass

Reviewed By: ngbronson@fb.com

FB internal diff: D1076220

folly/MPMCQueue.h

index fef1730e3bf1ffddf4a91bc9a0edb7e94f06ab7b..defbdfe0007269fc39625094411e44e495182e43 100644 (file)
@@ -89,11 +89,11 @@ class MPMCQueue : boost::noncopyable {
  public:
   typedef T value_type;
 
-  explicit MPMCQueue(size_t capacity)
-    : capacity_(capacity)
-    , slots_(new detail::SingleElementQueue<T,Atom>[capacity +
+  explicit MPMCQueue(size_t queueCapacity)
+    : capacity_(queueCapacity)
+    , slots_(new detail::SingleElementQueue<T,Atom>[queueCapacity +
                                                     2 * kSlotPadding])
-    , stride_(computeStride(capacity))
+    , stride_(computeStride(queueCapacity))
     , pushTicket_(0)
     , popTicket_(0)
     , pushSpinCutoff_(0)