1
0
Fork 0

use a regex to match the method name

This commit is contained in:
Kevin Matz 2023-04-23 19:29:21 -04:00
parent 76b8f974e7
commit 913a1f789b
1 changed files with 3 additions and 3 deletions

View File

@ -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
}