Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/common/network/apple_dns_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ ActiveDnsQuery* AppleDnsResolverImpl::resolve(const std::string& dns_name,
}

// Proceed with resolution after establishing that the resolver has a live main_sd_ref_.
std::unique_ptr<PendingResolution> pending_resolution(
new PendingResolution(*this, callback, dispatcher_, main_sd_ref_, dns_name));
auto pending_resolution =
std::make_unique<PendingResolution>(*this, callback, dispatcher_, main_sd_ref_, dns_name);

DNSServiceErrorType error = pending_resolution->dnsServiceGetAddrInfo(dns_lookup_family);
if (error != kDNSServiceErr_NoError) {
Expand Down
4 changes: 2 additions & 2 deletions source/common/network/dns_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ ActiveDnsQuery* DnsResolverImpl::resolve(const std::string& dns_name,
initializeChannel(&options.options_, options.optmask_);
}

std::unique_ptr<PendingResolution> pending_resolution(
new PendingResolution(*this, callback, dispatcher_, channel_, dns_name));
auto pending_resolution =
std::make_unique<PendingResolution>(*this, callback, dispatcher_, channel_, dns_name);
if (dns_lookup_family == DnsLookupFamily::Auto) {
pending_resolution->fallback_if_failed_ = true;
}
Expand Down
4 changes: 2 additions & 2 deletions source/common/network/filter_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Network {

void FilterManagerImpl::addWriteFilter(WriteFilterSharedPtr filter) {
ASSERT(connection_.state() == Connection::State::Open);
ActiveWriteFilterPtr new_filter(new ActiveWriteFilter{*this, filter});
ActiveWriteFilterPtr new_filter = std::make_unique<ActiveWriteFilter>(*this, filter);
filter->initializeWriteFilterCallbacks(*new_filter);
LinkedList::moveIntoList(std::move(new_filter), downstream_filters_);
}
Expand All @@ -23,7 +23,7 @@ void FilterManagerImpl::addFilter(FilterSharedPtr filter) {

void FilterManagerImpl::addReadFilter(ReadFilterSharedPtr filter) {
ASSERT(connection_.state() == Connection::State::Open);
ActiveReadFilterPtr new_filter(new ActiveReadFilter{*this, filter});
ActiveReadFilterPtr new_filter = std::make_unique<ActiveReadFilter>(*this, filter);
filter->initializeReadFilterCallbacks(*new_filter);
LinkedList::moveIntoListBack(std::move(new_filter), upstream_filters_);
}
Expand Down
3 changes: 1 addition & 2 deletions source/common/network/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ Address::InstanceConstSharedPtr Utility::resolveUrl(const std::string& url) {
} else if (urlIsUdpScheme(url)) {
return parseInternetAddressAndPort(url.substr(UDP_SCHEME.size()));
} else if (urlIsUnixScheme(url)) {
return Address::InstanceConstSharedPtr{
new Address::PipeInstance(url.substr(UNIX_SCHEME.size()))};
return std::make_shared<Address::PipeInstance>(url.substr(UNIX_SCHEME.size()));
} else {
throw EnvoyException(absl::StrCat("unknown protocol scheme: ", url));
}
Expand Down