Fixed Nz::String's implementation of std::geltine (#136)
* Fix Nz::String's std::getline * Bugfix * Bugfix again
This commit is contained in:
parent
2cd9fa2b7a
commit
4f0435754f
|
|
@ -5975,20 +5975,7 @@ namespace std
|
||||||
|
|
||||||
istream& getline(istream& is, Nz::String& str)
|
istream& getline(istream& is, Nz::String& str)
|
||||||
{
|
{
|
||||||
str.Clear();
|
return getline(is, str, is.widen('\n'));
|
||||||
|
|
||||||
char c;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
is.get(c);
|
|
||||||
if (c != '\n' && c != '\0')
|
|
||||||
str += c;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return is;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -6012,7 +5999,11 @@ namespace std
|
||||||
if (c != delim && c != '\0')
|
if (c != delim && c != '\0')
|
||||||
str += c;
|
str += c;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (c == '\0')
|
||||||
|
is.setstate(std::ios_base::eofbit);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue