Migrate TypeList to store IntrusivePtrs

This changes return types of TypeList::Types() and
IndexType::IndexTypes() to return std::vector instead of type_list*
This commit is contained in:
Jon Siwek 2020-05-06 23:12:47 -07:00
parent 011866a908
commit 455fc29b1a
14 changed files with 271 additions and 248 deletions

View file

@ -12,12 +12,12 @@ static bool is_string_set(const BroType* type)
if ( ! type->IsSet() )
return false;
auto index_types = type->AsSetType()->IndexTypes();
const auto& index_types = type->AsSetType()->IndexTypes();
if ( index_types->length() != 1 )
if ( index_types.size() != 1 )
return false;
return (*index_types)[0]->Tag() == TYPE_STRING;
return index_types[0]->Tag() == TYPE_STRING;
}
std::set<std::string> val_to_topic_set(Val* val)