mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Deprecate TableVal::Intersect(), replace with Intersection()
This commit is contained in:
parent
7e89c8f0df
commit
e5f66cd2e6
3 changed files with 17 additions and 9 deletions
18
src/Val.h
18
src/Val.h
|
@ -795,11 +795,19 @@ public:
|
|||
// Returns true if the addition typechecked, false if not.
|
||||
bool RemoveFrom(Val* v) const override;
|
||||
|
||||
// Returns a new table that is the intersection of this
|
||||
// table and the given table. Intersection is just done
|
||||
// on index, not on yield value, so this really only makes
|
||||
// sense for sets.
|
||||
TableVal* Intersect(const TableVal* v) const;
|
||||
/**
|
||||
* Returns a new table that is the intersection of this table
|
||||
* and the given table. Intersection is done only on index, not on
|
||||
* yield value, so this generally makes most sense to use for sets,
|
||||
* not tables.
|
||||
* @param v The intersecting table.
|
||||
* @return The intersection of this table and the given one.
|
||||
*/
|
||||
IntrusivePtr<TableVal> Intersection(const TableVal& v) const;
|
||||
|
||||
[[deprecated("Remove in v4.1. Use Intersection() instead.")]]
|
||||
TableVal* Intersect(const TableVal* v) const
|
||||
{ return Intersection(*v).release(); }
|
||||
|
||||
// Returns true if this set contains the same members as the
|
||||
// given set. Note that comparisons are done using hash keys,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue