Commit 29deb3cf authored by Michael Lee's avatar Michael Lee Committed by Facebook Github Bot

Fix -Wshadow warning in sorted_vector_types

Summary: `last` was already passed in as a variable, so switch this so there isn't a local variable at all.

Reviewed By: mlogan, yfeldblum

Differential Revision: D4615206

fbshipit-source-id: dd8e3157e54dc2abe3dfd97837ce327371f4f7b2
parent 80430673
......@@ -171,14 +171,15 @@ namespace detail {
}
if (middle != cont.begin() && cmp(*middle, *(middle - 1))) {
std::inplace_merge(cont.begin(), middle, cont.end(), cmp);
auto last = std::unique(
cont.begin(),
cont.end(),
[&](typename OurContainer::value_type const& a,
typename OurContainer::value_type const& b) {
return !cmp(a, b) && !cmp(b, a);
});
cont.erase(last, cont.end());
cont.erase(
std::unique(
cont.begin(),
cont.end(),
[&](typename OurContainer::value_type const& a,
typename OurContainer::value_type const& b) {
return !cmp(a, b) && !cmp(b, a);
}),
cont.end());
}
}
}
......
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