Skip to content

Commit

Permalink
fixing universal location execution
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenPuttemans committed Mar 9, 2015
1 parent 361eb63 commit bf16f74
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions apps/traincascade/imagestorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,12 @@ bool CvCascadeImageReader::NegReader::create( const string _filename, Size _winS
if ( !file.is_open() )
return false;

size_t pos = _filename.rfind('\\');
char dlmrt = '\\';
if (pos == string::npos)
{
pos = _filename.rfind('/');
dlmrt = '/';
}
dirname = pos == string::npos ? "" : _filename.substr(0, pos) + dlmrt;
while( !file.eof() )
{
std::getline(file, str);
if (str.empty()) break;
if (str.at(0) == '#' ) continue; /* comment */
imgFilenames.push_back(dirname + str);
imgFilenames.push_back(str);
}
file.close();

Expand Down

0 comments on commit bf16f74

Please sign in to comment.