diff options
Diffstat (limited to 'http')
-rw-r--r-- | http/app.hpp | 2 | ||||
-rw-r--r-- | http/logging.hpp | 2 | ||||
-rw-r--r-- | http/routing.hpp | 2 | ||||
-rw-r--r-- | http/websocket.hpp | 18 |
4 files changed, 3 insertions, 21 deletions
diff --git a/http/app.hpp b/http/app.hpp index 1a7af83241..eeb331ea96 100644 --- a/http/app.hpp +++ b/http/app.hpp @@ -63,7 +63,7 @@ class App router.handle(req, asyncResp); } - DynamicRule& routeDynamic(std::string&& rule) + DynamicRule& routeDynamic(const std::string& rule) { return router.newRuleDynamic(rule); } diff --git a/http/logging.hpp b/http/logging.hpp index 0ed47771c4..49a9cbaaf0 100644 --- a/http/logging.hpp +++ b/http/logging.hpp @@ -182,7 +182,7 @@ const void* logPtr(T p) } template <LogLevel level> -inline void vlog(const FormatString& format, std::format_args&& args) +inline void vlog(const FormatString& format, const std::format_args& args) { if constexpr (bmcwebCurrentLoggingLevel < level) { diff --git a/http/routing.hpp b/http/routing.hpp index 921bfe8dc0..7872b76cb5 100644 --- a/http/routing.hpp +++ b/http/routing.hpp @@ -605,7 +605,7 @@ class Router // appear to work with the std::move on adaptor. validatePrivilege( req, asyncResp, rule, - [&rule, asyncResp, adaptor(std::forward<Adaptor>(adaptor))]( + [&rule, asyncResp, adaptor = std::forward<Adaptor>(adaptor)]( Request& thisReq) mutable { rule.handleUpgrade(thisReq, asyncResp, std::move(adaptor)); }); diff --git a/http/websocket.hpp b/http/websocket.hpp index 2ef8412886..4262c70a5c 100644 --- a/http/websocket.hpp +++ b/http/websocket.hpp @@ -36,11 +36,9 @@ struct Connection : std::enable_shared_from_this<Connection> Connection& operator=(const Connection&&) = delete; virtual void sendBinary(std::string_view msg) = 0; - virtual void sendBinary(std::string&& msg) = 0; virtual void sendEx(MessageType type, std::string_view msg, std::function<void()>&& onDone) = 0; virtual void sendText(std::string_view msg) = 0; - virtual void sendText(std::string&& msg) = 0; virtual void close(std::string_view msg = "quit") = 0; virtual void deferRead() = 0; virtual void resumeRead() = 0; @@ -181,14 +179,6 @@ class ConnectionImpl : public Connection }); } - void sendBinary(std::string&& msg) override - { - ws.binary(true); - outBuffer.commit(boost::asio::buffer_copy(outBuffer.prepare(msg.size()), - boost::asio::buffer(msg))); - doWrite(); - } - void sendText(std::string_view msg) override { ws.text(true); @@ -197,14 +187,6 @@ class ConnectionImpl : public Connection doWrite(); } - void sendText(std::string&& msg) override - { - ws.text(true); - outBuffer.commit(boost::asio::buffer_copy(outBuffer.prepare(msg.size()), - boost::asio::buffer(msg))); - doWrite(); - } - void close(std::string_view msg) override { ws.async_close( |