fix sign comparison warnings
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@290469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6186,7 +6186,7 @@ private:
|
||||
_Position __position_;
|
||||
const value_type* __result_;
|
||||
value_type __suffix_;
|
||||
ptrdiff_t _N_;
|
||||
ptrdiff_t __n_;
|
||||
vector<int> __subs_;
|
||||
|
||||
public:
|
||||
@@ -6269,10 +6269,10 @@ public:
|
||||
private:
|
||||
void __init(_BidirectionalIterator __a, _BidirectionalIterator __b);
|
||||
void __establish_result () {
|
||||
if (__subs_[_N_] == -1)
|
||||
if (__subs_[__n_] == -1)
|
||||
__result_ = &__position_->prefix();
|
||||
else
|
||||
__result_ = &(*__position_)[__subs_[_N_]];
|
||||
__result_ = &(*__position_)[__subs_[__n_]];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -6281,7 +6281,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
regex_token_iterator()
|
||||
: __result_(nullptr),
|
||||
__suffix_(),
|
||||
_N_(0)
|
||||
__n_(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6292,7 +6292,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
{
|
||||
if (__position_ != _Position())
|
||||
__establish_result ();
|
||||
else if (__subs_[_N_] == -1)
|
||||
else if (__subs_[__n_] == -1)
|
||||
{
|
||||
__suffix_.matched = true;
|
||||
__suffix_.first = __a;
|
||||
@@ -6309,7 +6309,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
const regex_type& __re, int __submatch,
|
||||
regex_constants::match_flag_type __m)
|
||||
: __position_(__a, __b, __re, __m),
|
||||
_N_(0),
|
||||
__n_(0),
|
||||
__subs_(1, __submatch)
|
||||
{
|
||||
__init(__a, __b);
|
||||
@@ -6321,7 +6321,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
const regex_type& __re, const vector<int>& __submatches,
|
||||
regex_constants::match_flag_type __m)
|
||||
: __position_(__a, __b, __re, __m),
|
||||
_N_(0),
|
||||
__n_(0),
|
||||
__subs_(__submatches)
|
||||
{
|
||||
__init(__a, __b);
|
||||
@@ -6336,7 +6336,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
initializer_list<int> __submatches,
|
||||
regex_constants::match_flag_type __m)
|
||||
: __position_(__a, __b, __re, __m),
|
||||
_N_(0),
|
||||
__n_(0),
|
||||
__subs_(__submatches)
|
||||
{
|
||||
__init(__a, __b);
|
||||
@@ -6352,7 +6352,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
const int (&__submatches)[_Np],
|
||||
regex_constants::match_flag_type __m)
|
||||
: __position_(__a, __b, __re, __m),
|
||||
_N_(0),
|
||||
__n_(0),
|
||||
__subs_(__submatches, __submatches + _Np)
|
||||
{
|
||||
__init(__a, __b);
|
||||
@@ -6364,7 +6364,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
: __position_(__x.__position_),
|
||||
__result_(__x.__result_),
|
||||
__suffix_(__x.__suffix_),
|
||||
_N_(__x._N_),
|
||||
__n_(__x.__n_),
|
||||
__subs_(__x.__subs_)
|
||||
{
|
||||
if (__x.__result_ == &__x.__suffix_)
|
||||
@@ -6386,7 +6386,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
else
|
||||
__result_ = __x.__result_;
|
||||
__suffix_ = __x.__suffix_;
|
||||
_N_ = __x._N_;
|
||||
__n_ = __x.__n_;
|
||||
__subs_ = __x.__subs_;
|
||||
|
||||
if ( __result_ != nullptr && __result_ != &__suffix_ )
|
||||
@@ -6409,7 +6409,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
|
||||
return false;
|
||||
if (__result_ == &__suffix_ || __x.__result_ == &__x.__suffix_)
|
||||
return false;
|
||||
return __position_ == __x.__position_ && _N_ == __x._N_ &&
|
||||
return __position_ == __x.__position_ && __n_ == __x.__n_ &&
|
||||
__subs_ == __x.__subs_;
|
||||
}
|
||||
|
||||
@@ -6420,14 +6420,14 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
|
||||
_Position __prev = __position_;
|
||||
if (__result_ == &__suffix_)
|
||||
__result_ = nullptr;
|
||||
else if (_N_ + 1 < __subs_.size())
|
||||
else if (static_cast<size_t>(__n_ + 1) < __subs_.size())
|
||||
{
|
||||
++_N_;
|
||||
++__n_;
|
||||
__establish_result();
|
||||
}
|
||||
else
|
||||
{
|
||||
_N_ = 0;
|
||||
__n_ = 0;
|
||||
++__position_;
|
||||
if (__position_ != _Position())
|
||||
__establish_result();
|
||||
|
||||
Reference in New Issue
Block a user