From 0b40010450c46875207624f918bf8bebe9bbf5b2 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 1 Aug 2016 15:13:39 -0700 Subject: [PATCH] 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 --- folly/Bits.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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_; -- 2.34.1