mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
GH-1624: Migrate check_and_promote and a few Expr methods to IntrusivePtr
This commit is contained in:
parent
75b7bd0c6e
commit
edf90a51e4
7 changed files with 76 additions and 65 deletions
|
@ -345,8 +345,8 @@ int IndexType::MatchesIndex(detail::ListExpr* const index) const
|
|||
exprs[0]->GetType()->Tag() == TYPE_ADDR )
|
||||
return MATCHES_INDEX_SCALAR;
|
||||
|
||||
return check_and_promote_exprs(index, GetIndices().get()) ? MATCHES_INDEX_SCALAR
|
||||
: DOES_NOT_MATCH_INDEX;
|
||||
return check_and_promote_exprs(index, GetIndices()) ? MATCHES_INDEX_SCALAR
|
||||
: DOES_NOT_MATCH_INDEX;
|
||||
}
|
||||
|
||||
void IndexType::Describe(ODesc* d) const
|
||||
|
@ -590,7 +590,7 @@ SetType::SetType(TypeListPtr ind, detail::ListExprPtr arg_elements)
|
|||
{
|
||||
if ( indices )
|
||||
{ // We already have a type.
|
||||
if ( ! check_and_promote_exprs(elements.get(), indices.get()) )
|
||||
if ( ! check_and_promote_exprs(elements.get(), indices) )
|
||||
SetError();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue