diff options
author | Dave Tapuska <dtapuska@chromium.org> | 2018-02-20 17:16:33 -0500 |
---|---|---|
committer | Dave Tapuska <dtapuska@chromium.org> | 2018-02-20 17:16:33 -0500 |
commit | af3813cd7337c622df067914cfa22732c08d6067 (patch) | |
tree | 6115b101e117b06008face5f46d434a9cd783ca2 /src | |
parent | e34ec6077af141dd5dfc1c334ecdcce3c6b51612 (diff) | |
download | protobuf-af3813cd7337c622df067914cfa22732c08d6067.tar.gz protobuf-af3813cd7337c622df067914cfa22732c08d6067.tar.bz2 protobuf-af3813cd7337c622df067914cfa22732c08d6067.zip |
Rename a shadowed variable.
Shadowed variables can cause readability issues. Ensure a shadowed
variable isn't used in header files which may be used in a dependent
project that explicitly disables them.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/map_entry_lite.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/map_entry_lite.h b/src/google/protobuf/map_entry_lite.h index dc6ec917..bbfb9c15 100644 --- a/src/google/protobuf/map_entry_lite.h +++ b/src/google/protobuf/map_entry_lite.h @@ -354,9 +354,9 @@ class MapEntryImpl : public Base { // We could use memcmp here, but we don't bother. The tag is one byte. GOOGLE_COMPILE_ASSERT(kTagSize == 1, tag_size_error); if (size > 0 && *reinterpret_cast<const char*>(data) == kValueTag) { - typename Map::size_type size = map_->size(); + typename Map::size_type map_size = map_->size(); value_ptr_ = &(*map_)[key_]; - if (GOOGLE_PREDICT_TRUE(size != map_->size())) { + if (GOOGLE_PREDICT_TRUE(map_size != map_->size())) { // We created a new key-value pair. Fill in the value. typedef typename MapIf<ValueTypeHandler::kIsEnum, int*, Value*>::type T; |