Dont ignore EOF because users cannot distinguish EOF and empty input line

This commit is contained in:
Peter Conrad 2015-06-21 15:33:50 +02:00
parent dd1c77b327
commit 8ff0f3e764

View file

@ -78,8 +78,6 @@ namespace fc {
fc::istream& getline( fc::istream& i, fc::string& s, char delim ) { fc::istream& getline( fc::istream& i, fc::string& s, char delim ) {
fc::stringstream ss; fc::stringstream ss;
try
{
char c; char c;
i.read( &c, 1 ); i.read( &c, 1 );
while( true ) { while( true ) {
@ -87,9 +85,6 @@ namespace fc {
if( c != '\r' ) ss.write(&c,1); if( c != '\r' ) ss.write(&c,1);
i.read( &c, 1 ); i.read( &c, 1 );
} }
} catch ( fc::eof_exception& )
{
}
s = ss.str(); s = ss.str();
return i; return i;
} }