mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Deprecate Val(BroFile*) ctor, replace with one using IntrusivePtr
This commit is contained in:
parent
a031f5b727
commit
65aad4922d
9 changed files with 25 additions and 19 deletions
|
@ -57,10 +57,13 @@ static const IntrusivePtr<FileType>& GetStringFileType() noexcept
|
|||
return string_file_type;
|
||||
}
|
||||
|
||||
Val::Val(BroFile* f)
|
||||
: val(f), type(GetStringFileType())
|
||||
Val::Val(BroFile* f) : Val({AdoptRef{}, f})
|
||||
{}
|
||||
|
||||
Val::Val(IntrusivePtr<BroFile> f)
|
||||
: val(f.release()), type(GetStringFileType())
|
||||
{
|
||||
assert(f->FType()->Tag() == TYPE_STRING);
|
||||
assert(val.file_val->FType()->Tag() == TYPE_STRING);
|
||||
}
|
||||
|
||||
Val::~Val()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue