mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Fix whitespace issues
This commit is contained in:
parent
12f2153f67
commit
10f0fffe29
1 changed files with 5 additions and 8 deletions
13
src/Expr.cc
13
src/Expr.cc
|
@ -939,7 +939,7 @@ IncrExpr::IncrExpr(BroExprTag arg_tag, IntrusivePtr<Expr> arg_op)
|
||||||
}
|
}
|
||||||
|
|
||||||
IntrusivePtr<Val> IncrExpr::DoSingleEval(Frame* f, Val* v) const
|
IntrusivePtr<Val> IncrExpr::DoSingleEval(Frame* f, Val* v) const
|
||||||
{
|
{
|
||||||
bro_int_t k = v->CoerceToInt();
|
bro_int_t k = v->CoerceToInt();
|
||||||
|
|
||||||
if ( Tag() == EXPR_INCR )
|
if ( Tag() == EXPR_INCR )
|
||||||
|
@ -953,15 +953,15 @@ IntrusivePtr<Val> IncrExpr::DoSingleEval(Frame* f, Val* v) const
|
||||||
RuntimeError("count underflow");
|
RuntimeError("count underflow");
|
||||||
}
|
}
|
||||||
|
|
||||||
BroType* ret_type = Type();
|
BroType* ret_type = Type();
|
||||||
if ( IsVector(ret_type->Tag()) )
|
if ( IsVector(ret_type->Tag()) )
|
||||||
ret_type = Type()->YieldType();
|
ret_type = Type()->YieldType();
|
||||||
|
|
||||||
if ( ret_type->Tag() == TYPE_INT )
|
if ( ret_type->Tag() == TYPE_INT )
|
||||||
return {AdoptRef{}, val_mgr->GetInt(k)};
|
return {AdoptRef{}, val_mgr->GetInt(k)};
|
||||||
else
|
else
|
||||||
return {AdoptRef{}, val_mgr->GetCount(k)};
|
return {AdoptRef{}, val_mgr->GetCount(k)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IntrusivePtr<Val> IncrExpr::Eval(Frame* f) const
|
IntrusivePtr<Val> IncrExpr::Eval(Frame* f) const
|
||||||
|
@ -988,7 +988,6 @@ IntrusivePtr<Val> IncrExpr::Eval(Frame* f) const
|
||||||
op->Assign(f, std::move(v_vec));
|
op->Assign(f, std::move(v_vec));
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto new_v = DoSingleEval(f, v.get());
|
auto new_v = DoSingleEval(f, v.get());
|
||||||
|
@ -2511,7 +2510,6 @@ IndexExpr::IndexExpr(IntrusivePtr<Expr> arg_op1,
|
||||||
|
|
||||||
else
|
else
|
||||||
ExprError("Unknown MatchesIndex() return value");
|
ExprError("Unknown MatchesIndex() return value");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IndexExpr::CanAdd() const
|
bool IndexExpr::CanAdd() const
|
||||||
|
@ -4739,7 +4737,6 @@ IntrusivePtr<Val> ListExpr::AddSetInit(const BroType* t, IntrusivePtr<Val> aggr)
|
||||||
|
|
||||||
if ( ! tv->ExpandAndInit(std::move(element), nullptr) )
|
if ( ! tv->ExpandAndInit(std::move(element), nullptr) )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return aggr;
|
return aggr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue