Fix whitespace issues

This commit is contained in:
Tim Wojtulewicz 2020-03-24 13:11:11 -07:00
parent 12f2153f67
commit 10f0fffe29

View file

@ -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;