mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Deprecate Frame::NthElement(), replace with GetElement()
This commit is contained in:
parent
e9e2e388f8
commit
1ccbe743d0
2 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,10 @@ public:
|
||||||
* @param n the index to get.
|
* @param n the index to get.
|
||||||
* @return the value at index *n* of the underlying array.
|
* @return the value at index *n* of the underlying array.
|
||||||
*/
|
*/
|
||||||
|
const IntrusivePtr<Val>& GetElement(int n) const
|
||||||
|
{ return frame[n]; }
|
||||||
|
|
||||||
|
[[deprecated("Remove in v4.1. Use GetElement(int).")]]
|
||||||
Val* NthElement(int n) const { return frame[n].get(); }
|
Val* NthElement(int n) const { return frame[n].get(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -367,7 +367,7 @@ IntrusivePtr<Val> BroFunc::operator()(zeek::Args* args, Frame* parent) const
|
||||||
{
|
{
|
||||||
const auto& arg = (*args)[j];
|
const auto& arg = (*args)[j];
|
||||||
|
|
||||||
if ( f->NthElement(j) != arg )
|
if ( f->GetElement(j) != arg )
|
||||||
// Either not yet set, or somebody reassigned the frame slot.
|
// Either not yet set, or somebody reassigned the frame slot.
|
||||||
f->SetElement(j, arg);
|
f->SetElement(j, arg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue