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

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@310759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2017-08-11 20:54:01 +00:00
parent 302557b724
commit e75f899c12
37 changed files with 148 additions and 148 deletions

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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(); int n = str_.size();
str_.push_back(static_cast<CharT>(__c)); str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -41,18 +41,18 @@ public:
protected: protected:
virtual typename base::int_type 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(); int n = str_.size();
str_.push_back(static_cast<CharT>(__c)); str_.push_back(static_cast<CharT>(ch));
str_.resize(str_.capacity()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -38,18 +38,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -39,18 +39,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); int n = static_cast<int>(str_.size());
str_.push_back(__c); str_.push_back(ch);
str_.resize(str_.capacity()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); int n = static_cast<int>(str_.size());
str_.push_back(__c); str_.push_back(ch);
str_.resize(str_.capacity()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); int n = static_cast<int>(str_.size());
str_.push_back(__c); str_.push_back(ch);
str_.resize(str_.capacity()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); int n = static_cast<int>(str_.size());
str_.push_back(__c); str_.push_back(ch);
str_.resize(str_.capacity()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -41,18 +41,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -37,18 +37,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
virtual int virtual int

View File

@@ -35,18 +35,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -39,18 +39,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };

View File

@@ -34,18 +34,18 @@ public:
protected: protected:
virtual typename base::int_type 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()); 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()); str_.resize(str_.capacity());
base::setp(const_cast<CharT*>(str_.data()), base::setp(const_cast<CharT*>(str_.data()),
const_cast<CharT*>(str_.data() + str_.size())); const_cast<CharT*>(str_.data() + str_.size()));
base::pbump(n+1); base::pbump(n+1);
} }
return __c; return ch;
} }
}; };