1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

fixed parsing of CC in gpu module

This commit is contained in:
Alexey Spizhevoy
2011-01-20 14:34:27 +00:00
parent 574b3f94a1
commit 9e48f64149
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -145,16 +145,17 @@ namespace
template <typename Comparer>
bool compare(const std::string& str, int x, Comparer cmp)
{
if (str.find_first_not_of(" ") == string::npos)
return false;
std::stringstream stream(str);
int val;
stream >> val;
while (!stream.eof() && !stream.fail())
while (!stream.eof())
{
stream >> val;
if (cmp(val, x))
return true;
stream >> val;
}
return false;