mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Deprecate Attr::AttrExpr(), replace with GetExpr()
This commit is contained in:
parent
2ebc20a164
commit
97636e97a5
9 changed files with 39 additions and 34 deletions
|
@ -213,7 +213,7 @@ void ID::SetVal(IntrusivePtr<Expr> ev, init_class c)
|
|||
if ( ! a )
|
||||
Internal("no add/delete function in ID::SetVal");
|
||||
|
||||
EvalFunc({NewRef{}, a->AttrExpr()}, std::move(ev));
|
||||
EvalFunc(a->GetExpr(), std::move(ev));
|
||||
}
|
||||
|
||||
bool ID::IsRedefinable() const
|
||||
|
@ -291,7 +291,7 @@ std::string ID::GetDeprecationWarning() const
|
|||
Attr* depr_attr = FindAttr(ATTR_DEPRECATED);
|
||||
if ( depr_attr )
|
||||
{
|
||||
ConstExpr* expr = static_cast<ConstExpr*>(depr_attr->AttrExpr());
|
||||
auto expr = static_cast<ConstExpr*>(depr_attr->GetExpr().get());
|
||||
if ( expr )
|
||||
{
|
||||
StringVal* text = expr->Value()->AsStringVal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue