mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09: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
13
src/Val.cc
13
src/Val.cc
|
@ -3730,8 +3730,19 @@ void VectorVal::ValDescribe(ODesc* d) const
|
|||
d->Add("]");
|
||||
}
|
||||
|
||||
ValPtr check_and_promote(ValPtr v, const Type* t, bool is_init,
|
||||
ValPtr check_and_promote(ValPtr v, const TypePtr& t, bool is_init,
|
||||
const detail::Location* expr_location)
|
||||
{
|
||||
// Once 5.0 comes out, this function can merge with the deprecated one below it, and this
|
||||
// pragma block can go away.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
return check_and_promote(v, t.get(), is_init, expr_location);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
[[deprecated("Remove in v5.1. Use version that takes TypePtr instead.")]] ValPtr
|
||||
check_and_promote(ValPtr v, const Type* t, bool is_init, const detail::Location* expr_location)
|
||||
{
|
||||
if ( ! v )
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue