Use shared_ptrs for DNS_Mapping objects

This commit is contained in:
Tim Wojtulewicz 2022-03-28 14:59:48 -07:00
parent b531ec97ef
commit c4cac72fd7
4 changed files with 32 additions and 36 deletions

View file

@ -171,7 +171,7 @@ void DNS_Mapping::Save(FILE* f) const
fprintf(f, "%s\n", addr.AsString().c_str());
}
void DNS_Mapping::Merge(DNS_Mapping* other)
void DNS_Mapping::Merge(const DNS_MappingPtr& other)
{
std::copy(other->names.begin(), other->names.end(), std::back_inserter(names));
std::copy(other->addrs.begin(), other->addrs.end(), std::back_inserter(addrs));