use a regex to match the method name
This commit is contained in:
parent
76b8f974e7
commit
913a1f789b
|
@ -42,7 +42,7 @@ Method::Method(Method *parent)
|
|||
|
||||
Method::~Method()
|
||||
{
|
||||
for(auto &child: children_)
|
||||
for (auto &child: children_)
|
||||
delete child;
|
||||
}
|
||||
|
||||
|
@ -109,8 +109,8 @@ bool Method::matchesName(std::string &name) const
|
|||
if (name == "*")
|
||||
return true; // wildcard match
|
||||
|
||||
/// \todo pattern matching
|
||||
return false;
|
||||
std::regex re(name);
|
||||
return std::regex_match(name_, re); // regex match
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue