mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Merge branch 'intrusive_ptr' of https://github.com/MaxKellermann/zeek
* 'intrusive_ptr' of https://github.com/MaxKellermann/zeek: (32 commits) Scope: store IntrusivePtr in `local` Scope: pass IntrusivePtr to AddInit() DNS_Mgr: use class IntrusivePtr Scope: use class IntrusivePtr Attr: use class IntrusivePtr Expr: check_and_promote_expr() returns IntrusivePtr Frame: use class IntrusivePtr Val: RecordVal::LookupWithDefault() returns IntrusivePtr Type: RecordType::FieldDefault() returns IntrusivePtr Val: TableVal::Delete() returns IntrusivePtr Type: base_type() returns IntrusivePtr Type: init_type() returns IntrusivePtr Type: merge_types() returns IntrusivePtr Type: use class IntrusivePtr in VectorType Type: use class IntrusivePtr in EnumType Type: use class IntrusivePtr in FileType Type: use class IntrusivePtr in TypeDecl Type: make TypeDecl `final` and the dtor non-`virtual` Type: use class IntrusivePtr in TypeType Type: use class IntrusivePtr in FuncType ...
This commit is contained in:
commit
b62727a7fa
108 changed files with 1737 additions and 2067 deletions
|
@ -84,25 +84,25 @@ VectorVal* BroSubstring::VecToPolicy(Vec* vec)
|
|||
{
|
||||
BroSubstring* bst = (*vec)[i];
|
||||
|
||||
RecordVal* st_val = new RecordVal(sw_substring_type);
|
||||
st_val->Assign(0, new StringVal(new BroString(*bst)));
|
||||
auto st_val = make_intrusive<RecordVal>(sw_substring_type);
|
||||
st_val->Assign(0, make_intrusive<StringVal>(new BroString(*bst)));
|
||||
|
||||
VectorVal* aligns = new VectorVal(sw_align_vec_type);
|
||||
auto aligns = make_intrusive<VectorVal>(sw_align_vec_type);
|
||||
|
||||
for ( unsigned int j = 0; j < bst->GetNumAlignments(); ++j )
|
||||
{
|
||||
const BSSAlign& align = (bst->GetAlignments())[j];
|
||||
|
||||
RecordVal* align_val = new RecordVal(sw_align_type);
|
||||
align_val->Assign(0, new StringVal(new BroString(*align.string)));
|
||||
auto align_val = make_intrusive<RecordVal>(sw_align_type);
|
||||
align_val->Assign(0, make_intrusive<StringVal>(new BroString(*align.string)));
|
||||
align_val->Assign(1, val_mgr->GetCount(align.index));
|
||||
|
||||
aligns->Assign(j+1, align_val);
|
||||
aligns->Assign(j + 1, std::move(align_val));
|
||||
}
|
||||
|
||||
st_val->Assign(1, aligns);
|
||||
st_val->Assign(1, std::move(aligns));
|
||||
st_val->Assign(2, val_mgr->GetBool(bst->IsNewAlignment()));
|
||||
result->Assign(i+1, st_val);
|
||||
result->Assign(i + 1, std::move(st_val));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue