Commit 9e48f641 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

fixed parsing of CC in gpu module

parent 574b3f94
...@@ -145,16 +145,17 @@ namespace ...@@ -145,16 +145,17 @@ namespace
template <typename Comparer> template <typename Comparer>
bool compare(const std::string& str, int x, Comparer cmp) bool compare(const std::string& str, int x, Comparer cmp)
{ {
std::stringstream stream(str); if (str.find_first_not_of(" ") == string::npos)
return false;
std::stringstream stream(str);
int val; int val;
stream >> val;
while (!stream.eof() && !stream.fail()) while (!stream.eof())
{ {
stream >> val;
if (cmp(val, x)) if (cmp(val, x))
return true; return true;
stream >> val;
} }
return false; return false;
......
...@@ -918,7 +918,7 @@ struct CV_GpuCountNonZeroTest: CvTest ...@@ -918,7 +918,7 @@ struct CV_GpuCountNonZeroTest: CvTest
if (n != n_gold) if (n != n_gold)
{ {
ts->printf(CvTS::CONSOLE, "%d %d %d %d %d\n", n, n_gold, depth, cols, rows); ts->printf(CvTS::LOG, "%d %d %d %d %d\n", n, n_gold, depth, cols, rows);
n_gold = cv::countNonZero(src); n_gold = cv::countNonZero(src);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment