mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Change EventRegistry/EventHandler methods to use std::string{_view}
This commit is contained in:
parent
78e3267c44
commit
dca587c604
4 changed files with 16 additions and 16 deletions
|
@ -10,9 +10,9 @@
|
|||
#include "broker/Manager.h"
|
||||
#include "broker/Data.h"
|
||||
|
||||
EventHandler::EventHandler(const char* arg_name)
|
||||
EventHandler::EventHandler(std::string arg_name)
|
||||
{
|
||||
name = copy_string(arg_name);
|
||||
name = std::move(arg_name);
|
||||
used = false;
|
||||
local = nullptr;
|
||||
type = nullptr;
|
||||
|
@ -24,7 +24,6 @@ EventHandler::EventHandler(const char* arg_name)
|
|||
EventHandler::~EventHandler()
|
||||
{
|
||||
Unref(local);
|
||||
delete [] name;
|
||||
}
|
||||
|
||||
EventHandler::operator bool() const
|
||||
|
@ -39,7 +38,7 @@ FuncType* EventHandler::FType(bool check_export)
|
|||
if ( type )
|
||||
return type;
|
||||
|
||||
const auto& id = lookup_ID(name, current_module.c_str(), false, false,
|
||||
const auto& id = lookup_ID(name.data(), current_module.c_str(), false, false,
|
||||
check_export);
|
||||
|
||||
if ( ! id )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue