replaced unlink() & _unlink() with more standard remove() (ticket #334)

pull/13383/head
Vadim Pisarevsky 15 years ago
parent 1d93ca00de
commit f894d1de31
  1. 6
      modules/highgui/src/loadsave.cpp
  2. 2
      tests/cv/src/anearestneighbors.cpp
  3. 6
      tests/cxcore/src/aio.cpp
  4. 4
      tests/ml/src/slmltests.cpp

@ -332,7 +332,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
if( !decoder->readHeader() )
{
if( filename )
unlink(filename);
remove(filename);
return 0;
}
@ -374,7 +374,7 @@ imdecode_( const Mat& buf, int flags, int hdrtype, Mat* mat=0 )
bool code = decoder->readData( *data );
if( filename )
unlink(filename);
remove(filename);
if( !code )
{
@ -441,7 +441,7 @@ bool imencode( const string& ext, const Mat& image,
fseek( f, 0, SEEK_SET );
buf.resize(fread( &buf[0], 1, buf.size(), f ));
fclose(f);
unlink(filename);
remove(filename);
}
return code;
}

@ -511,7 +511,7 @@ void CV_FlannSavedIndexTest::createModel(const cv::Mat &data)
index->save( filename );
createIndex( data, SavedIndexParams(filename));
unlink( filename );
remove( filename );
}
CV_LSHTest lsh_test;

@ -425,11 +425,7 @@ void CV_IOTest::run( int )
}
fs.release();
#ifdef _MSC_VER
_unlink(filename);
#else
unlink(filename);
#endif
remove(filename);
}
}

@ -105,8 +105,8 @@ int CV_SLMLTest::validate_test_results( int testCaseIdx )
f1.close();
f2.close();
// delete temporary files
unlink( fname1 );
unlink( fname2 );
remove( fname1 );
remove( fname2 );
// 2. compare responses
CV_Assert( test_resps1.size() == test_resps2.size() );

Loading…
Cancel
Save