mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 20:29:39 +08:00
Fix breakage introduced by adding -Wshadow.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
54
include/list
54
include/list
@@ -1751,15 +1751,15 @@ list<_Tp, _Alloc>::erase(const_iterator __p)
|
|||||||
--base::__sz();
|
--base::__sz();
|
||||||
#if _LIBCPP_DEBUG_LEVEL >= 2
|
#if _LIBCPP_DEBUG_LEVEL >= 2
|
||||||
__c_node* __c = __get_db()->__find_c_and_lock(this);
|
__c_node* __c = __get_db()->__find_c_and_lock(this);
|
||||||
for (__i_node** __p = __c->end_; __p != __c->beg_; )
|
for (__i_node** __ip = __c->end_; __ip != __c->beg_; )
|
||||||
{
|
{
|
||||||
--__p;
|
--__ip;
|
||||||
iterator* __i = static_cast<iterator*>((*__p)->__i_);
|
iterator* __i = static_cast<iterator*>((*__ip)->__i_);
|
||||||
if (__i->__ptr_ == __n)
|
if (__i->__ptr_ == __n)
|
||||||
{
|
{
|
||||||
(*__p)->__c_ = nullptr;
|
(*__ip)->__c_ = nullptr;
|
||||||
if (--__c->end_ != __p)
|
if (--__c->end_ != __ip)
|
||||||
memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
|
memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__get_db()->unlock();
|
__get_db()->unlock();
|
||||||
@@ -1961,16 +1961,16 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c)
|
|||||||
__libcpp_db* __db = __get_db();
|
__libcpp_db* __db = __get_db();
|
||||||
__c_node* __cn1 = __db->__find_c_and_lock(this);
|
__c_node* __cn1 = __db->__find_c_and_lock(this);
|
||||||
__c_node* __cn2 = __db->__find_c(&__c);
|
__c_node* __cn2 = __db->__find_c(&__c);
|
||||||
for (__i_node** __p = __cn2->end_; __p != __cn2->beg_;)
|
for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;)
|
||||||
{
|
{
|
||||||
--__p;
|
--__ip;
|
||||||
iterator* __i = static_cast<iterator*>((*__p)->__i_);
|
iterator* __i = static_cast<iterator*>((*__ip)->__i_);
|
||||||
if (__i->__ptr_ != __c.__end_as_link())
|
if (__i->__ptr_ != __c.__end_as_link())
|
||||||
{
|
{
|
||||||
__cn1->__add(*__p);
|
__cn1->__add(*__ip);
|
||||||
(*__p)->__c_ = __cn1;
|
(*__ip)->__c_ = __cn1;
|
||||||
if (--__cn2->end_ != __p)
|
if (--__cn2->end_ != __ip)
|
||||||
memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
|
memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__db->unlock();
|
__db->unlock();
|
||||||
@@ -2004,16 +2004,16 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
|
|||||||
__libcpp_db* __db = __get_db();
|
__libcpp_db* __db = __get_db();
|
||||||
__c_node* __cn1 = __db->__find_c_and_lock(this);
|
__c_node* __cn1 = __db->__find_c_and_lock(this);
|
||||||
__c_node* __cn2 = __db->__find_c(&__c);
|
__c_node* __cn2 = __db->__find_c(&__c);
|
||||||
for (__i_node** __p = __cn2->end_; __p != __cn2->beg_;)
|
for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;)
|
||||||
{
|
{
|
||||||
--__p;
|
--__ip;
|
||||||
iterator* __j = static_cast<iterator*>((*__p)->__i_);
|
iterator* __j = static_cast<iterator*>((*__ip)->__i_);
|
||||||
if (__j->__ptr_ == __f)
|
if (__j->__ptr_ == __f)
|
||||||
{
|
{
|
||||||
__cn1->__add(*__p);
|
__cn1->__add(*__ip);
|
||||||
(*__p)->__c_ = __cn1;
|
(*__ip)->__c_ = __cn1;
|
||||||
if (--__cn2->end_ != __p)
|
if (--__cn2->end_ != __ip)
|
||||||
memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
|
memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
__db->unlock();
|
__db->unlock();
|
||||||
@@ -2058,19 +2058,19 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, con
|
|||||||
__libcpp_db* __db = __get_db();
|
__libcpp_db* __db = __get_db();
|
||||||
__c_node* __cn1 = __db->__find_c_and_lock(this);
|
__c_node* __cn1 = __db->__find_c_and_lock(this);
|
||||||
__c_node* __cn2 = __db->__find_c(&__c);
|
__c_node* __cn2 = __db->__find_c(&__c);
|
||||||
for (__i_node** __p = __cn2->end_; __p != __cn2->beg_;)
|
for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;)
|
||||||
{
|
{
|
||||||
--__p;
|
--__ip;
|
||||||
iterator* __j = static_cast<iterator*>((*__p)->__i_);
|
iterator* __j = static_cast<iterator*>((*__ip)->__i_);
|
||||||
for (__link_pointer __k = __f.__ptr_;
|
for (__link_pointer __k = __f.__ptr_;
|
||||||
__k != __l.__ptr_; __k = __k->__next_)
|
__k != __l.__ptr_; __k = __k->__next_)
|
||||||
{
|
{
|
||||||
if (__j->__ptr_ == __k)
|
if (__j->__ptr_ == __k)
|
||||||
{
|
{
|
||||||
__cn1->__add(*__p);
|
__cn1->__add(*__ip);
|
||||||
(*__p)->__c_ = __cn1;
|
(*__ip)->__c_ = __cn1;
|
||||||
if (--__cn2->end_ != __p)
|
if (--__cn2->end_ != __ip)
|
||||||
memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
|
memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user