Change TableVal::RecoverIndex() to return IntrusivePtr

This commit is contained in:
Jon Siwek 2020-03-23 12:48:21 -07:00
parent 0b5a18495d
commit b045ce4bb3
11 changed files with 45 additions and 90 deletions

View file

@ -868,11 +868,10 @@ bool Manager::Write(EnumVal* id, RecordVal* columns_arg)
TableEntryVal* v;
while ( (v = filter->config->AsTable()->NextEntry(k, c)) )
{
ListVal* index = filter->config->RecoverIndex(k);
auto index = filter->config->RecoverIndex(k);
string key = index->Index(0)->AsString()->CheckString();
string value = v->Value()->AsString()->CheckString();
info->config.insert(std::make_pair(copy_string(key.c_str()), copy_string(value.c_str())));
Unref(index);
delete k;
}