app: fix -Wpessimizing-move
clang14 doesn't compile because of
"moving a temporary object prevents copy elision".
This also alligns the plaintext socket with style of SSL socket.
Tested: trivial change. It builds.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I9203cf162d738290306f9ba73ec0ab8f2ca5033c
diff --git a/http/app.hpp b/http/app.hpp
index 18147e4..d3afe60 100644
--- a/http/app.hpp
+++ b/http/app.hpp
@@ -123,13 +123,12 @@
if (-1 == socketFd)
{
- server = std::move(std::make_unique<server_t>(
- this, bindaddrStr, portUint, nullptr, io));
+ server = std::make_unique<server_t>(this, bindaddrStr, portUint,
+ nullptr, io);
}
else
{
- server = std::move(
- std::make_unique<server_t>(this, socketFd, nullptr, io));
+ server = std::make_unique<server_t>(this, socketFd, nullptr, io);
}
server->run();