Deprecate Val::Type(), replace with GetType()

This commit is contained in:
Jon Siwek 2020-05-11 12:14:54 -07:00
parent 737420c359
commit 1eb723fc9d
30 changed files with 270 additions and 255 deletions

View file

@ -741,10 +741,10 @@ ListVal* internal_list_val(const char* name)
if ( v )
{
if ( v->Type()->Tag() == TYPE_LIST )
if ( v->GetType()->Tag() == TYPE_LIST )
return (ListVal*) v;
else if ( v->Type()->IsSet() )
else if ( v->GetType()->IsSet() )
{
TableVal* tv = v->AsTableVal();
auto lv = tv->ToPureListVal();
@ -812,7 +812,7 @@ IntrusivePtr<Func> zeek::lookup_func(const char* name)
if ( ! v )
return nullptr;
if ( ! IsFunc(v->Type()->Tag()) )
if ( ! IsFunc(v->GetType()->Tag()) )
reporter->InternalError("Expected variable '%s' to be a function", name);
return {NewRef{}, v->AsFunc()};