fixed "Conditional jump or move depends on uninitialised value(s)" in GBD

This commit is contained in:
Ilya Lavrenov 2015-09-01 13:22:49 +03:00 committed by Dikay900
parent 1d77d697ef
commit ee2008abe8

View File

@ -243,7 +243,7 @@ CvGBTrees::train( const CvMat* _train_data, int _tflag,
for (int i=1; i<n; ++i) for (int i=1; i<n; ++i)
{ {
int k = 0; int k = 0;
while ((int(orig_response->data.fl[i]) - class_labels->data.i[k]) && (k<j)) while ((k<j) && (int(orig_response->data.fl[i]) - class_labels->data.i[k]))
k++; k++;
if (k == j) if (k == j)
{ {