Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.
Tested:
Ran clang-tidy-11 and got a clean result.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
diff --git a/http/websocket.hpp b/http/websocket.hpp
index f5c2a7a..363076e 100644
--- a/http/websocket.hpp
+++ b/http/websocket.hpp
@@ -66,17 +66,17 @@
ConnectionImpl(
const crow::Request& reqIn, Adaptor adaptorIn,
std::function<void(Connection&, std::shared_ptr<bmcweb::AsyncResp>)>
- open_handler,
+ openHandler,
std::function<void(Connection&, const std::string&, bool)>
- message_handler,
- std::function<void(Connection&, const std::string&)> close_handler,
- std::function<void(Connection&)> error_handler) :
+ messageHandler,
+ 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),
- openHandler(std::move(open_handler)),
- messageHandler(std::move(message_handler)),
- closeHandler(std::move(close_handler)),
- errorHandler(std::move(error_handler)), session(reqIn.session)
+ openHandler(std::move(openHandler)),
+ messageHandler(std::move(messageHandler)),
+ closeHandler(std::move(closeHandler)),
+ errorHandler(std::move(errorHandler)), session(reqIn.session)
{
BMCWEB_LOG_DEBUG << "Creating new connection " << this;
}
@@ -202,7 +202,7 @@
{
ws.async_read(inBuffer,
[this, self(shared_from_this())](
- boost::beast::error_code ec, std::size_t bytes_read) {
+ boost::beast::error_code ec, std::size_t bytesRead) {
if (ec)
{
if (ec != boost::beast::websocket::error::closed)
@@ -220,7 +220,7 @@
{
messageHandler(*this, inString, ws.got_text());
}
- inBuffer.consume(bytes_read);
+ inBuffer.consume(bytesRead);
inString.clear();
doRead();
});