fixed android warnings

pull/83/head
Vadim Pisarevsky 11 years ago
parent c54ae801d3
commit d4d2a6ef7b
  1. 1
      modules/saliency/doc/misc
  2. 6
      modules/saliency/src/BING/CmFile.cpp
  3. 1
      modules/saliency/src/BING/kyheader.hpp
  4. 4
      modules/saliency/src/BING/objectnessBING.cpp

@ -1 +0,0 @@
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";

Loading…
Cancel
Save