diff options
| author | Ed Tanous <edtanous@google.com> | 2022-01-25 21:28:56 +0300 |
|---|---|---|
| committer | Ed Tanous <ed@tanous.net> | 2022-02-11 23:30:05 +0300 |
| commit | e05aec50f10116e6dda7e377bc61799aa5b7c166 (patch) | |
| tree | 964aedffefcc787029c571a83889247caa0d3968 /http | |
| parent | 213ffc701d838bece5893cda23475e7518bd6955 (diff) | |
| download | bmcweb-e05aec50f10116e6dda7e377bc61799aa5b7c166.tar.xz | |
Add readability-redundant-* checks
There's a number of redundancies in our code that clang can sanitize
out. Fix the existing problems, and enable the checks.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie63d7b7f0777b702fbf1b23a24e1bed7b4f5183b
Diffstat (limited to 'http')
| -rw-r--r-- | http/app.hpp | 2 | ||||
| -rw-r--r-- | http/http_connection.hpp | 3 | ||||
| -rw-r--r-- | http/websocket.hpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/http/app.hpp b/http/app.hpp index 03de3f8952..c1472e5ba3 100644 --- a/http/app.hpp +++ b/http/app.hpp @@ -142,7 +142,7 @@ class App std::vector<const std::string*> getRoutes() { - const std::string root(""); + const std::string root; return router.getRoutes(root); } std::vector<const std::string*> getRoutes(const std::string& parent) diff --git a/http/http_connection.hpp b/http/http_connection.hpp index 0b58e9b6f5..61d3f7b901 100644 --- a/http/http_connection.hpp +++ b/http/http_connection.hpp @@ -261,7 +261,7 @@ class Connection : return true; } sslUser.resize(lastChar); - std::string unsupportedClientId = ""; + std::string unsupportedClientId; sessionIsFromTransport = true; userSession = persistent_data::SessionStore::getInstance() .generateUserSession( @@ -725,7 +725,6 @@ class Connection : BMCWEB_LOG_DEBUG << this << " timer started"; } - private: Adaptor adaptor; Handler* handler; // Making this a std::optional allows it to be efficiently destroyed and diff --git a/http/websocket.hpp b/http/websocket.hpp index eadb276c0c..213c4c74c0 100644 --- a/http/websocket.hpp +++ b/http/websocket.hpp @@ -77,7 +77,7 @@ class ConnectionImpl : public Connection std::function<void(Connection&, const std::string&)> closeHandler, std::function<void(Connection&)> errorHandler) : Connection(reqIn, reqIn.session->username), - ws(std::move(adaptorIn)), inString(), inBuffer(inString, 131088), + ws(std::move(adaptorIn)), inBuffer(inString, 131088), openHandler(std::move(openHandler)), messageHandler(std::move(messageHandler)), closeHandler(std::move(closeHandler)), |
