mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Type: use class IntrusivePtr in TypeDecl
This commit is contained in:
parent
838bba5206
commit
43af5f8349
8 changed files with 32 additions and 38 deletions
|
@ -182,7 +182,7 @@ char* CompositeHash::SingleValHash(int type_check, char* kp0,
|
|||
{
|
||||
auto rv_i = rv->Lookup(i);
|
||||
|
||||
Attributes* a = rt->FieldDecl(i)->attrs;
|
||||
Attributes* a = rt->FieldDecl(i)->attrs.get();
|
||||
bool optional = (a && a->FindAttr(ATTR_OPTIONAL));
|
||||
|
||||
if ( ! (rv_i || optional) )
|
||||
|
@ -519,7 +519,7 @@ int CompositeHash::SingleTypeKeySize(BroType* bt, const Val* v,
|
|||
|
||||
for ( int i = 0; i < num_fields; ++i )
|
||||
{
|
||||
Attributes* a = rt->FieldDecl(i)->attrs;
|
||||
Attributes* a = rt->FieldDecl(i)->attrs.get();
|
||||
bool optional = (a && a->FindAttr(ATTR_OPTIONAL));
|
||||
|
||||
sz = SingleTypeKeySize(rt->FieldType(i),
|
||||
|
@ -914,7 +914,7 @@ const char* CompositeHash::RecoverOneVal(const HashKey* k, const char* kp0,
|
|||
{
|
||||
IntrusivePtr<Val> v;
|
||||
|
||||
Attributes* a = rt->FieldDecl(i)->attrs;
|
||||
Attributes* a = rt->FieldDecl(i)->attrs.get();
|
||||
bool optional = (a && a->FindAttr(ATTR_OPTIONAL));
|
||||
|
||||
kp = RecoverOneVal(k, kp, k_end,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue