Skip to content

Commit

Permalink
Remove Wshadow warning for velox/dwio/common/FilterNode.h (facebookin…
Browse files Browse the repository at this point in the history
…cubator#8266)

Summary:
Pull Request resolved: facebookincubator#8266

Fix a -Wshadow warning here

Reviewed By: r-barnes

Differential Revision: D52340433

fbshipit-source-id: 2772db94a5094a2a5d50bbad43298c4cbd52ce7d
  • Loading branch information
Benwei Shi authored and facebook-github-bot committed Jan 6, 2024
1 parent c5aa05f commit 75a5dca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions velox/dwio/common/FilterNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,23 @@ struct FilterNode {
return name == other.name;
}

bool match(const std::string_view& name) const {
bool match(const std::string_view& name_to_match) const {
// no match if any is invalid
if (!valid()) {
// even current is invlaid
return false;
}

return this->name == name;
return name == name_to_match;
}

// expect the incoming list has all valid nodes
// so that current node can have partial info to match any of list item
std::vector<FilterNode>::const_iterator in(
const std::vector<FilterNode>& list) const {
return std::find_if(
list.cbegin(), list.cend(), [this](const FilterNode& node) {
return node.match(*this);
list.cbegin(), list.cend(), [this](const FilterNode& filter_node) {
return filter_node.match(*this);
});
}

Expand Down

0 comments on commit 75a5dca

Please sign in to comment.