1
0
Fork 0

root dispatching doesn't pop the pattern list

This commit is contained in:
Kevin Matz 2023-05-15 11:19:29 -04:00
parent 6853a2af5c
commit f72ca7e9f6
1 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,8 @@ bool Method::dispatch(std::list<std::string> patterns, const std::shared_ptr<Mes
return false; // NO pattern to match
auto name = patterns.front();
patterns.pop_front(); // take the first pattern
if (!isRoot())
patterns.pop_front(); // take the first pattern, if not the root method
if (patterns.empty()) // LEAF pattern
{