Commit 5e0bc982 authored by Manuel Grizonnet's avatar Manuel Grizonnet

WRG: comparison of unsigned expression < 0 is always false

parent 9d0ee185
......@@ -353,8 +353,10 @@ SEMClassifier<TInputImage, TOutputImage>
{
//label = (int) floor( 0.5 + nbClassesDbl * ran / double(RAND_MAX+1) );
label = rand() % nbClasses;
if (label < 0) label = 0;
else if (label >= nbClasses) label = nbClasses - 1;
if (label >= nbClasses)
{
label = nbClasses - 1;
}
*labelIter = label;
}
}
......
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