Commit d4d2a6ef authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed android warnings

parent c54ae801
misc @ 16789e8d
Subproject commit 16789e8dcad170f502c81ea2b9714a4dd6bff0c1
......@@ -52,7 +52,7 @@ bool CmFile::MkDir( std::string &_path )
if( _path.size() == 0 )
return false;
static char buffer[1024];
strcpy( buffer, _S( _path ) );
strcpy( buffer, _path.c_str() );
#ifdef _WIN32
for (int i = 0; buffer[i] != 0; i ++)
{
......@@ -64,7 +64,7 @@ bool CmFile::MkDir( std::string &_path )
}
}
CreateDirectoryA(_S(_path), 0);
CreateDirectoryA(_path.c_str(), 0);
return true;
#else
for ( int i = 0; buffer[i] != 0; i++ )
......@@ -76,7 +76,7 @@ bool CmFile::MkDir( std::string &_path )
buffer[i] = '/';
}
}
mkdir( _S( _path ), 0 );
mkdir( _path.c_str(), 0 );
return true;
#endif
}
......
......@@ -100,7 +100,6 @@ enum
CV_FLIP_VERTICAL = 0,
CV_FLIP_HORIZONTAL = 1
};
#define _S(str) ((str).c_str())
#define CHK_IND(p) ((p).x >= 0 && (p).x < _w && (p).y >= 0 && (p).y < _h)
#define CV_Assert_(expr, args) \
{\
......
......@@ -104,7 +104,7 @@ int ObjectnessBING::loadTrainedModel( std::string modelName ) // Return -1, 0,
if( !matRead( s1, filters1f ) || !matRead( sI, idx1i ) )
{
printf( "Can't load model: %s or %s\n", _S( s1 ), _S( sI ) );
printf( "Can't load model: %s or %s\n", s1.c_str(), sI.c_str() );
return 0;
}
......@@ -401,7 +401,7 @@ void ObjectnessBING::getObjBndBoxesForSingleImage( Mat img, ValStructVec<float,
CStr fName = _bbResDir + "bb";
std::vector<Vec4i> sortedBB = finalBoxes.getSortedStructVal();
std::ofstream ofs;
ofs.open( _S( fName + ".txt" ), std::ofstream::out );
ofs.open( ( fName + ".txt" ).c_str(), std::ofstream::out );
std::stringstream dim;
dim << sortedBB.size();
ofs << dim.str() << "\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment