From: Christopher Dykes Date: Mon, 1 Aug 2016 22:13:39 +0000 (-0700) Subject: Don't disable the shadowing warning just for a parameter name X-Git-Tag: v2016.08.08.00~42 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0b40010450c46875207624f918bf8bebe9bbf5b2;p=folly.git Don't disable the shadowing warning just for a parameter name Summary: Just rename the parameter instead, it's not worth it. Reviewed By: yfeldblum Differential Revision: D3651065 fbshipit-source-id: ce11c35a7923ab7e10868cedb49c47c0b427fd0c --- diff --git a/folly/Bits.h b/folly/Bits.h index e974c91d..0a649b82 100644 --- a/folly/Bits.h +++ b/folly/Bits.h @@ -375,14 +375,11 @@ class BitIterator * Construct a BitIterator that points at a given bit offset (default 0) * in iter. */ - #pragma GCC diagnostic push // bitOffset shadows a member - #pragma GCC diagnostic ignored "-Wshadow" - explicit BitIterator(const BaseIter& iter, size_t bitOffset=0) + explicit BitIterator(const BaseIter& iter, size_t bitOff=0) : bititerator_detail::BitIteratorBase::type(iter), - bitOffset_(bitOffset) { + bitOffset_(bitOff) { assert(bitOffset_ < bitsPerBlock()); } - #pragma GCC diagnostic pop size_t bitOffset() const { return bitOffset_;