diff --git a/src/Func.cc b/src/Func.cc index 75d604a560..b0d1889282 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -564,7 +564,7 @@ void ScriptFunc::AddBody(StmtPtr new_body, const std::vector& new_inits, Body b; b.stmts = new_body; - b.groups = groups; + b.groups = {groups.begin(), groups.end()}; current_body = new_body; current_priority = b.priority = priority; diff --git a/src/Func.h b/src/Func.h index 37e1538fa2..4476935d2a 100644 --- a/src/Func.h +++ b/src/Func.h @@ -2,6 +2,7 @@ #pragma once +#include #include #include #include @@ -66,8 +67,8 @@ public: struct Body { detail::StmtPtr stmts; + std::forward_list groups; int priority; - std::set groups; // If any of the groups are disabled, this body is disabled. // The disabled field is updated from EventGroup instances. bool disabled = false;