Commit 70b158bb authored by Jim Meyering's avatar Jim Meyering Committed by Facebook Github Bot

folly/ConcurrentSkipList.h: avoid shadowing warnings (trivial)

Summary:
Compiling with gcc's proposed -Wshadow-compatible-local option
exposed some fix-worthy warnings. Rename to avoid the shadowing.

Reviewed By: evilmucedin

Differential Revision: D3999026

fbshipit-source-id: 26cb3033ba8c5538cc9217993f2fda6aef954a8f
parent fb77b407
...@@ -328,9 +328,9 @@ class ConcurrentSkipList { ...@@ -328,9 +328,9 @@ class ConcurrentSkipList {
// locks acquired and all valid, need to modify the links under the locks. // locks acquired and all valid, need to modify the links under the locks.
newNode = newNode =
NodeType::create(recycler_.alloc(), nodeHeight, std::forward<U>(data)); NodeType::create(recycler_.alloc(), nodeHeight, std::forward<U>(data));
for (int layer = 0; layer < nodeHeight; ++layer) { for (int k = 0; k < nodeHeight; ++k) {
newNode->setSkip(layer, succs[layer]); newNode->setSkip(k, succs[k]);
preds[layer]->setSkip(layer, newNode); preds[k]->setSkip(k, newNode);
} }
newNode->setFullyLinked(); newNode->setFullyLinked();
...@@ -378,8 +378,8 @@ class ConcurrentSkipList { ...@@ -378,8 +378,8 @@ class ConcurrentSkipList {
continue; // this will unlock all the locks continue; // this will unlock all the locks
} }
for (int layer = nodeHeight - 1; layer >= 0; --layer) { for (int k = nodeHeight - 1; k >= 0; --k) {
preds[layer]->setSkip(layer, nodeToDelete->skip(layer)); preds[k]->setSkip(k, nodeToDelete->skip(k));
} }
incrementSize(-1); incrementSize(-1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment