Skip to content
Snippets Groups Projects
Commit dd7db209 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix reading to const string

parent 8dc142eb
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,11 @@ std::istream & oprr ( std::istream & in, const std::string & str, bool start ) {
char c_in = in.peek ( );
in.get ( );
 
if ( c_in == EOF ) {
in.clear ( std::ios::failbit );
return in;
}
if ( in.good ( ) ) {
if ( start && ( ( c_in == ' ' ) || ( c_in == '\n' ) || ( c_in == '\t' ) ) )
oprr ( in, str, start );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment