Test system included into Android build
This commit is contained in:
@@ -183,16 +183,15 @@ CvCapture_OpenNI::CvCapture_OpenNI()
|
||||
// Write configuration to the temporary file.
|
||||
// This is a hack, because there is a bug in RunXmlScript().
|
||||
// TODO: remove hack when bug in RunXmlScript() will be fixed.
|
||||
char xmlFilename[100];
|
||||
tmpnam( xmlFilename );
|
||||
std::ofstream outfile( xmlFilename );
|
||||
string xmlFilename = tempfile();
|
||||
std::ofstream outfile( xmlFilename.c_str() );
|
||||
outfile.write( XMLConfig.c_str(), XMLConfig.length() );
|
||||
outfile.close();
|
||||
|
||||
status = context.RunXmlScriptFromFile( xmlFilename );
|
||||
status = context.RunXmlScriptFromFile( xmlFilename.c_str() );
|
||||
|
||||
// Remove temporary configuration file.
|
||||
remove( xmlFilename );
|
||||
remove( xmlFilename.c_str() );
|
||||
#else
|
||||
status = context.RunXmlScript( XMLConfig.c_str() );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user