Deprecate TableVal::Intersect(), replace with Intersection()

This commit is contained in:
Jon Siwek 2020-05-20 15:13:55 -07:00
parent 7e89c8f0df
commit e5f66cd2e6
3 changed files with 17 additions and 9 deletions

View file

@ -1664,12 +1664,12 @@ bool TableVal::RemoveFrom(Val* val) const
return true;
}
TableVal* TableVal::Intersect(const TableVal* tv) const
IntrusivePtr<TableVal> TableVal::Intersection(const TableVal& tv) const
{
TableVal* result = new TableVal(table_type);
auto result = make_intrusive<TableVal>(table_type);
const PDict<TableEntryVal>* t0 = AsTable();
const PDict<TableEntryVal>* t1 = tv->AsTable();
const PDict<TableEntryVal>* t1 = tv.AsTable();
PDict<TableEntryVal>* t2 = result->AsNonConstTable();
// Figure out which is smaller; assign it to t1.