Skip to content

Commit 694319f

Browse files
committed
Cleanup: use std::make_unique in clone()
Change-Id: I19cba18d77993e215a451417142330bde7523bd7 Reviewed-on: http://review.couchbase.org/104346 Reviewed-by: Dave Rigby <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 699d166 commit 694319f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protocol/connection/client_connection.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,13 +666,13 @@ static Frame to_frame(const BinprotCommand& command) {
666666
}
667667

668668
std::unique_ptr<MemcachedConnection> MemcachedConnection::clone() {
669-
auto* result = new MemcachedConnection(
669+
auto result = std::make_unique<MemcachedConnection>(
670670
this->host, this->port, this->family, this->ssl);
671671
result->setSslCertFile(this->ssl_cert_file);
672672
result->setSslKeyFile(this->ssl_key_file);
673673
result->connect();
674674
result->applyFeatures("", this->effective_features);
675-
return std::unique_ptr<MemcachedConnection>{result};
675+
return result;
676676
}
677677

678678
void MemcachedConnection::recvFrame(Frame& frame) {

0 commit comments

Comments
 (0)