Skip to content
Snippets Groups Projects
Commit 5e0bc982 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

WRG: comparison of unsigned expression < 0 is always false

parent 9d0ee185
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
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