Deprecate RecordVal::Assign(int, Val*)

And adapt all usages to the existing overload taking IntrusivePtr.
This commit is contained in:
Jon Siwek 2020-05-18 23:57:57 -07:00
parent d7ca63c1be
commit f3d160d034
38 changed files with 366 additions and 332 deletions

View file

@ -900,7 +900,7 @@ const char* CompositeHash::RecoverOneVal(const HashKey* k, const char* kp0,
RecordType* rt = t->AsRecordType();
int num_fields = rt->NumFields();
std::vector<Val*> values;
std::vector<IntrusivePtr<Val>> values;
int i;
for ( i = 0; i < num_fields; ++i )
{
@ -922,7 +922,7 @@ const char* CompositeHash::RecoverOneVal(const HashKey* k, const char* kp0,
break;
}
values.push_back(v.release());
values.emplace_back(std::move(v));
}
ASSERT(int(values.size()) == num_fields);
@ -930,7 +930,7 @@ const char* CompositeHash::RecoverOneVal(const HashKey* k, const char* kp0,
auto rv = make_intrusive<RecordVal>(IntrusivePtr{NewRef{}, rt});
for ( int i = 0; i < num_fields; ++i )
rv->Assign(i, values[i]);
rv->Assign(i, std::move(values[i]));
*pval = std::move(rv);
kp1 = kp;