Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6787bf8

Browse files
committed
fix infinite loop bug when reading test cases
- pushing character back onto stream causes stream state to never fail when test cases contain string and/or vector<string> for paramater/return values - simplest case found so far: parameter: string, return: string
1 parent 540c076 commit 6787bf8

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

‎src/com/dogcows/resources/C++Driver

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ std::istream& operator >> (std::istream& in, std::string& str)
6767
}
6868
str = s.str();
6969
}
70-
else
71-
{
72-
in.putback(c);
73-
}
7470

7571
return in;
7672
}
@@ -94,10 +90,6 @@ std::istream& operator >> (std::istream& in, std::vector<T>& vec)
9490
while (in.good() && std::isspace(in.peek())) in.get();
9591
}
9692
}
97-
else
98-
{
99-
in.putback(c);
100-
}
10193

10294
return in;
10395
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /