mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-30 03:17:15 +02:00
Avoid shadow warning on older versions off GCC
This commit is contained in:
@ -3338,11 +3338,11 @@ struct table : boost::unordered::detail::functions<typename Types::hasher,
|
|||||||
|
|
||||||
inline node_pointer add_node_unique(node_pointer n, std::size_t key_hash)
|
inline node_pointer add_node_unique(node_pointer n, std::size_t key_hash)
|
||||||
{
|
{
|
||||||
std::size_t bucket = this->hash_to_bucket(key_hash);
|
std::size_t bucket_index = this->hash_to_bucket(key_hash);
|
||||||
bucket_pointer b = this->get_bucket(bucket);
|
bucket_pointer b = this->get_bucket(bucket_index);
|
||||||
|
|
||||||
// TODO: Do this need to set_first_in_group ?
|
// TODO: Do this need to set_first_in_group ?
|
||||||
n->bucket_info_ = bucket;
|
n->bucket_info_ = bucket_index;
|
||||||
n->set_first_in_group();
|
n->set_first_in_group();
|
||||||
|
|
||||||
if (!b->next_) {
|
if (!b->next_) {
|
||||||
@ -3875,21 +3875,21 @@ struct table : boost::unordered::detail::functions<typename Types::hasher,
|
|||||||
inline node_pointer add_node_equiv(
|
inline node_pointer add_node_equiv(
|
||||||
node_pointer n, std::size_t key_hash, node_pointer pos)
|
node_pointer n, std::size_t key_hash, node_pointer pos)
|
||||||
{
|
{
|
||||||
std::size_t bucket = this->hash_to_bucket(key_hash);
|
std::size_t bucket_index = this->hash_to_bucket(key_hash);
|
||||||
n->bucket_info_ = bucket;
|
n->bucket_info_ = bucket_index;
|
||||||
|
|
||||||
if (pos) {
|
if (pos) {
|
||||||
n->next_ = pos->next_;
|
n->next_ = pos->next_;
|
||||||
pos->next_ = n;
|
pos->next_ = n;
|
||||||
if (n->next_) {
|
if (n->next_) {
|
||||||
std::size_t next_bucket = this->node_bucket(next_node(n));
|
std::size_t next_bucket = this->node_bucket(next_node(n));
|
||||||
if (next_bucket != bucket) {
|
if (next_bucket != bucket_index) {
|
||||||
this->get_bucket(next_bucket)->next_ = n;
|
this->get_bucket(next_bucket)->next_ = n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
n->set_first_in_group();
|
n->set_first_in_group();
|
||||||
bucket_pointer b = this->get_bucket(bucket);
|
bucket_pointer b = this->get_bucket(bucket_index);
|
||||||
|
|
||||||
if (!b->next_) {
|
if (!b->next_) {
|
||||||
link_pointer start_node = this->get_previous_start();
|
link_pointer start_node = this->get_previous_start();
|
||||||
|
Reference in New Issue
Block a user