Skip to content

Commit

Permalink
fixing undesired behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenPuttemans committed Mar 4, 2015
1 parent 2c57717 commit 488babf
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 @@ -32,20 +32,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 488babf

Please sign in to comment.