Modernize use of std::make_unique
[folly.git] / folly / io / async / AsyncSSLSocket.cpp
index a30cc7cabf895b1bc0fca9339d1337a825115c50..4bb8a9b43525a37d0f80d95d20b4f357f365003b 100644 (file)
 #include <fcntl.h>
 #include <sys/types.h>
 #include <chrono>
+#include <memory>
 
 #include <folly/Bits.h>
+#include <folly/Format.h>
 #include <folly/SocketAddress.h>
 #include <folly/SpinLock.h>
 #include <folly/io/Cursor.h>
@@ -183,7 +185,7 @@ static BIO_METHOD* getSSLBioMethod() {
   return instance;
 }
 
-void* initsslBioMethod(void) {
+void* initsslBioMethod() {
   auto sslBioMethod = getSSLBioMethod();
   // override the bwrite method for MSG_EOR support
   OpenSSLUtils::setCustomBioWriteMethod(sslBioMethod, AsyncSSLSocket::bioWrite);
@@ -1715,7 +1717,7 @@ int AsyncSSLSocket::sslVerifyCallback(
 
 void AsyncSSLSocket::enableClientHelloParsing()  {
     parseClientHello_ = true;
-    clientHelloInfo_.reset(new ssl::ClientHelloInfo());
+    clientHelloInfo_ = std::make_unique<ssl::ClientHelloInfo>();
 }
 
 void AsyncSSLSocket::resetClientHelloParsing(SSL *ssl)  {