mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Deprecate Frame::GetElement(ID*), replace with GetElementByID()
This commit is contained in:
parent
1ccbe743d0
commit
9f4eca081f
3 changed files with 13 additions and 6 deletions
|
@ -74,7 +74,12 @@ public:
|
|||
* @param id the id who's value to retreive
|
||||
* @return the value associated with *id*
|
||||
*/
|
||||
Val* GetElement(const ID* id) const;
|
||||
const IntrusivePtr<Val>& GetElementByID(const IntrusivePtr<ID>& id) const
|
||||
{ return GetElementByID(id.get()); }
|
||||
|
||||
[[deprecated("Remove in v4.1. Use GetElementByID().")]]
|
||||
Val* GetElement(const ID* id) const
|
||||
{ return GetElementByID(id).get(); }
|
||||
|
||||
/**
|
||||
* Resets all of the indexes from [*startIdx, frame_size) in
|
||||
|
@ -232,6 +237,8 @@ private:
|
|||
|
||||
using OffsetMap = std::unordered_map<std::string, int>;
|
||||
|
||||
const IntrusivePtr<Val>& GetElementByID(const ID* id) const;
|
||||
|
||||
/**
|
||||
* Sets the element at index *n* of the underlying array to *v*, but does
|
||||
* not take ownership of a reference count to it. This method is used to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue