mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
EventRegistry: remove uses of PDict
This commit is contained in:
parent
6fa0f4ac49
commit
acff8d5a2b
3 changed files with 45 additions and 68 deletions
10
src/main.cc
10
src/main.cc
|
@ -982,17 +982,15 @@ int main(int argc, char** argv)
|
|||
if ( zeek_init ) //### this should be a function
|
||||
mgr.QueueEventFast(zeek_init, val_list{});
|
||||
|
||||
EventRegistry::string_list* dead_handlers =
|
||||
EventRegistry::string_list dead_handlers =
|
||||
event_registry->UnusedHandlers();
|
||||
|
||||
if ( dead_handlers->length() > 0 && check_for_unused_event_handlers )
|
||||
if ( ! dead_handlers.empty() && check_for_unused_event_handlers )
|
||||
{
|
||||
for ( int i = 0; i < dead_handlers->length(); ++i )
|
||||
reporter->Warning("event handler never invoked: %s", (*dead_handlers)[i]);
|
||||
for ( const string& handler : dead_handlers )
|
||||
reporter->Warning("event handler never invoked: %s", handler.c_str());
|
||||
}
|
||||
|
||||
delete dead_handlers;
|
||||
|
||||
if ( stmts )
|
||||
{
|
||||
stmt_flow_type flow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue