mirror of https://github.com/qt/qthttpserver.git
Remove explicit move of a QHttpServerResponse temporary
This move causes a warning on macOS 12 (treated as error): src/httpserver/qhttpserver.cpp:170:20: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] response = std::move(afterRequestHandler(std::move(response), request)); ^ src/httpserver/qhttpserver.cpp:170:20: note: remove std::move call here response = std::move(afterRequestHandler(std::move(response), request)); ^~~~~~~~~~ ~ Note: QHttpServerResponse does not have a copy constructor, so the move is done anyway. Change-Id: I9d411895323c2601cb3a1596de488c8d7f40e46b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
1b91eb912f
commit
62eda14026
|
@ -167,7 +167,7 @@ void QHttpServer::sendResponse(QHttpServerResponse &&response,
|
|||
{
|
||||
Q_D(QHttpServer);
|
||||
for (auto afterRequestHandler : d->afterRequestHandlers)
|
||||
response = std::move(afterRequestHandler(std::move(response), request));
|
||||
response = afterRequestHandler(std::move(response), request);
|
||||
response.write(makeResponder(request, socket));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue