Move IntrusivePtr and utility methods to the zeek namespace

This commit is contained in:
Tim Wojtulewicz 2020-06-24 16:40:00 -04:00
parent 4668378d91
commit 9364e6a5b7
255 changed files with 3761 additions and 3730 deletions

View file

@ -328,8 +328,8 @@ void BroFile::RaiseOpenEvent()
if ( ! ::file_opened )
return;
IntrusivePtr<BroFile> bf{NewRef{}, this};
Event* event = new ::Event(::file_opened, {make_intrusive<Val>(std::move(bf))});
zeek::IntrusivePtr<BroFile> bf{zeek::NewRef{}, this};
Event* event = new ::Event(::file_opened, {zeek::make_intrusive<Val>(std::move(bf))});
mgr.Dispatch(event, true);
}
@ -346,11 +346,11 @@ double BroFile::Size()
return s.st_size;
}
IntrusivePtr<BroFile> BroFile::Get(const char* name)
zeek::IntrusivePtr<BroFile> BroFile::Get(const char* name)
{
for ( const auto &el : open_files )
if ( el.first == name )
return {NewRef{}, el.second};
return {zeek::NewRef{}, el.second};
return make_intrusive<BroFile>(name, "w");
return zeek::make_intrusive<BroFile>(name, "w");
}