mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 12:40:05 +08:00
removed changes of r8043; fixed 4 broken ml tests by other way
This commit is contained in:
parent
6d00182e13
commit
eaf0d38f03
@ -199,10 +199,7 @@ int CvMLData::read_csv(const char* filename)
|
|||||||
int type;
|
int type;
|
||||||
token = strtok(buf, str_delimiter);
|
token = strtok(buf, str_delimiter);
|
||||||
if (!token)
|
if (!token)
|
||||||
{
|
break;
|
||||||
fclose(file);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < cols_count-1; i++)
|
for (int i = 0; i < cols_count-1; i++)
|
||||||
{
|
{
|
||||||
str_to_flt_elem( token, el_ptr[i], type);
|
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);
|
str_to_flt_elem( token, el_ptr[cols_count-1], type);
|
||||||
var_types_ptr[cols_count-1] |= type;
|
var_types_ptr[cols_count-1] |= type;
|
||||||
cvSeqPush( seq, el_ptr );
|
cvSeqPush( seq, el_ptr );
|
||||||
if( !fgets_chomp( buf, M, file ) || !strchr( buf, delimiter ) )
|
if( !fgets_chomp( buf, M, file ) )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user