comparing the result of is.get() with EOF is non-portable (fails on IRIX)

[SVN r8924]
This commit is contained in:
Jens Maurer
2001-02-04 18:39:39 +00:00
parent 603337af8f
commit 2f8875124b

View File

@ -137,7 +137,7 @@ istream& get_line(istream& is, nstring_type& s, char delim)
{ {
char c = (char)is.get(); char c = (char)is.get();
s.erase(s.begin(), s.end()); s.erase(s.begin(), s.end());
while((c != delim) && (c != EOF)) while((c != delim) && is.good())
{ {
s.append(1, c); s.append(1, c);
c = (char)is.get(); c = (char)is.get();
@ -176,7 +176,7 @@ istream& get_line(istream& is, string_type& s, char delim)
{ {
char c = (char)is.get(); char c = (char)is.get();
s.erase(s.begin(), s.end()); s.erase(s.begin(), s.end());
while((c != delim) && (c != EOF)) while((c != delim) && is.good())
{ {
s.append(1, c); s.append(1, c);
c = (char)is.get(); c = (char)is.get();