Commit 81f5e0a8 authored by Ben Boeckel's avatar Ben Boeckel

Glob: Accept a string in Glob::AddExpression

Change-Id: I5fc21da7073177768088a7298d84632c43f70bd6
parent 1d531416
......@@ -441,7 +441,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
{
if ( !cexpr.empty() )
{
this->AddExpression(cexpr.c_str());
this->AddExpression(cexpr);
}
cexpr = "";
}
......@@ -452,7 +452,7 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
}
if ( !cexpr.empty() )
{
this->AddExpression(cexpr.c_str());
this->AddExpression(cexpr);
}
// Handle network paths
......@@ -468,11 +468,11 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
}
//----------------------------------------------------------------------------
void Glob::AddExpression(const char* expr)
void Glob::AddExpression(const kwsys_stl::string& expr)
{
this->Internals->Expressions.push_back(
kwsys::RegularExpression(
this->PatternToRegex(expr).c_str()));
this->PatternToRegex(expr)));
}
//----------------------------------------------------------------------------
......
......@@ -91,7 +91,7 @@ protected:
const kwsys_stl::string& dir);
//! Add regular expression
void AddExpression(const char* expr);
void AddExpression(const kwsys_stl::string& expr);
//! Add a file to the list
void AddFile(kwsys_stl::vector<kwsys_stl::string>& files, const kwsys_stl::string& file);
......
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