From: Maria Dimashova Date: Mon, 16 Apr 2012 13:50:10 +0000 (+0000) Subject: removed changes of r8043; fixed 4 broken ml tests by other way X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~2074 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eaf0d38f0307a8c0dcca8437609d6b3e5dedaa35;p=platform%2Fupstream%2Fopencv.git removed changes of r8043; fixed 4 broken ml tests by other way --- diff --git a/modules/ml/src/data.cpp b/modules/ml/src/data.cpp index 8afd1a9..2b44d38 100644 --- a/modules/ml/src/data.cpp +++ b/modules/ml/src/data.cpp @@ -199,10 +199,7 @@ int CvMLData::read_csv(const char* filename) int type; token = strtok(buf, str_delimiter); if (!token) - { - fclose(file); - return -1; - } + break; for (int i = 0; i < cols_count-1; i++) { str_to_flt_elem( token, el_ptr[i], type); @@ -217,7 +214,7 @@ int CvMLData::read_csv(const char* filename) str_to_flt_elem( token, el_ptr[cols_count-1], type); var_types_ptr[cols_count-1] |= type; cvSeqPush( seq, el_ptr ); - if( !fgets_chomp( buf, M, file ) || !strchr( buf, delimiter ) ) + if( !fgets_chomp( buf, M, file ) ) break; } fclose(file);