[libcxx] [test] Rename __c to ch. NFCI.

This improves readability and (theoretically) improves portability,
as __ugly names are reserved.

llvm-svn: 310759
This commit is contained in:
Stephan T. Lavavej 2017-08-11 20:54:01 +00:00
parent aae63566dc
commit 55467c4685
37 changed files with 148 additions and 148 deletions

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = str_.size();
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -41,18 +41,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = str_.size();
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -38,18 +38,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -39,18 +39,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(__c);
str_.push_back(ch);
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(__c);
str_.push_back(ch);
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(__c);
str_.push_back(ch);
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(__c);
str_.push_back(ch);
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -41,18 +41,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -37,18 +37,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
virtual int

View File

@ -35,18 +35,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -39,18 +39,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};

View File

@ -34,18 +34,18 @@ public:
protected:
virtual typename base::int_type
overflow(typename base::int_type __c = base::traits_type::eof())
overflow(typename base::int_type ch = base::traits_type::eof())
{
if (__c != base::traits_type::eof())
if (ch != base::traits_type::eof())
{
int n = static_cast<int>(str_.size());
str_.push_back(static_cast<CharT>(__c));
str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1);
}
return __c;
return ch;
}
};