clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/http/http2_connection.hpp b/http/http2_connection.hpp
index 68ffc1f..f0826d2 100644
--- a/http/http2_connection.hpp
+++ b/http/http2_connection.hpp
@@ -99,10 +99,10 @@
return 0;
}
- static ssize_t
- fileReadCallback(nghttp2_session* /* session */, int32_t streamId,
- uint8_t* buf, size_t length, uint32_t* dataFlags,
- nghttp2_data_source* /*source*/, void* userPtr)
+ static ssize_t fileReadCallback(
+ nghttp2_session* /* session */, int32_t streamId, uint8_t* buf,
+ size_t length, uint32_t* dataFlags, nghttp2_data_source* /*source*/,
+ void* userPtr)
{
self_type& self = userPtrToSelf(userPtr);
diff --git a/http/http_body.hpp b/http/http_body.hpp
index 834c8d3..d76ed49 100644
--- a/http/http_body.hpp
+++ b/http/http_body.hpp
@@ -176,14 +176,14 @@
ec = {};
}
- boost::optional<std::pair<const_buffers_type, bool>>
- get(boost::beast::error_code& ec)
+ boost::optional<std::pair<const_buffers_type, bool>> get(
+ boost::beast::error_code& ec)
{
return getWithMaxSize(ec, std::numeric_limits<size_t>::max());
}
- boost::optional<std::pair<const_buffers_type, bool>>
- getWithMaxSize(boost::beast::error_code& ec, size_t maxSize)
+ boost::optional<std::pair<const_buffers_type, bool>> getWithMaxSize(
+ boost::beast::error_code& ec, size_t maxSize)
{
std::pair<const_buffers_type, bool> ret;
if (!body.file().is_open())
diff --git a/http/mutual_tls.cpp b/http/mutual_tls.cpp
index 5f76145..0074711 100644
--- a/http/mutual_tls.cpp
+++ b/http/mutual_tls.cpp
@@ -62,9 +62,9 @@
}
}
-std::shared_ptr<persistent_data::UserSession>
- verifyMtlsUser(const boost::asio::ip::address& clientIp,
- boost::asio::ssl::verify_context& ctx)
+std::shared_ptr<persistent_data::UserSession> verifyMtlsUser(
+ const boost::asio::ip::address& clientIp,
+ boost::asio::ssl::verify_context& ctx)
{
// do nothing if TLS is disabled
if (!persistent_data::SessionStore::getInstance()
diff --git a/http/mutual_tls.hpp b/http/mutual_tls.hpp
index aec7ae1..d722a23 100644
--- a/http/mutual_tls.hpp
+++ b/http/mutual_tls.hpp
@@ -13,6 +13,6 @@
std::string getUsernameFromCommonName(std::string_view commonName);
-std::shared_ptr<persistent_data::UserSession>
- verifyMtlsUser(const boost::asio::ip::address& clientIp,
- boost::asio::ssl::verify_context& ctx);
+std::shared_ptr<persistent_data::UserSession> verifyMtlsUser(
+ const boost::asio::ip::address& clientIp,
+ boost::asio::ssl::verify_context& ctx);
diff --git a/http/mutual_tls_meta.hpp b/http/mutual_tls_meta.hpp
index d87ce19..861c209 100644
--- a/http/mutual_tls_meta.hpp
+++ b/http/mutual_tls_meta.hpp
@@ -10,8 +10,8 @@
#include <string>
#include <string_view>
-inline std::optional<std::string_view>
- mtlsMetaParseSslUser(std::string_view sslUser)
+inline std::optional<std::string_view> mtlsMetaParseSslUser(
+ std::string_view sslUser)
{
// Parses a Meta internal TLS client certificate Subject CN in
// '<entityType>:<entity>[/<hostname>]' format and returns the resulting
diff --git a/http/nghttp2_adapters.hpp b/http/nghttp2_adapters.hpp
index 7345d2f..8333b25 100644
--- a/http/nghttp2_adapters.hpp
+++ b/http/nghttp2_adapters.hpp
@@ -36,8 +36,8 @@
}
nghttp2_session_callbacks(const nghttp2_session_callbacks&) = delete;
- nghttp2_session_callbacks&
- operator=(const nghttp2_session_callbacks&) = delete;
+ nghttp2_session_callbacks& operator=(const nghttp2_session_callbacks&) =
+ delete;
nghttp2_session_callbacks(nghttp2_session_callbacks&&) = delete;
nghttp2_session_callbacks& operator=(nghttp2_session_callbacks&&) = delete;
@@ -78,8 +78,8 @@
nghttp2_session_callbacks_set_before_frame_send_callback(
ptr, beforeSendFrame);
}
- void
- setAfterFrameSendCallback(nghttp2_on_frame_send_callback afterSendFrame)
+ void setAfterFrameSendCallback(
+ nghttp2_on_frame_send_callback afterSendFrame)
{
nghttp2_session_callbacks_set_on_frame_send_callback(ptr,
afterSendFrame);
diff --git a/http/routing/baserule.hpp b/http/routing/baserule.hpp
index 8ef1afc..356d345 100644
--- a/http/routing/baserule.hpp
+++ b/http/routing/baserule.hpp
@@ -45,10 +45,10 @@
virtual void handle(const Request& /*req*/,
const std::shared_ptr<bmcweb::AsyncResp>&,
const std::vector<std::string>&) = 0;
- virtual void
- handleUpgrade(const Request& /*req*/,
- const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
- boost::asio::ip::tcp::socket&& /*adaptor*/)
+ virtual void handleUpgrade(
+ const Request& /*req*/,
+ const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
+ boost::asio::ip::tcp::socket&& /*adaptor*/)
{
asyncResp->res.result(boost::beast::http::status::not_found);
}
diff --git a/http/utility.hpp b/http/utility.hpp
index 48985fd..7bedcb9 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -424,9 +424,9 @@
return details::readUrlSegments(url, {std::forward<Args>(args)...});
}
-inline boost::urls::url
- replaceUrlSegment(const boost::urls::url_view_base& urlView,
- const uint replaceLoc, std::string_view newSegment)
+inline boost::urls::url replaceUrlSegment(
+ const boost::urls::url_view_base& urlView, const uint replaceLoc,
+ std::string_view newSegment)
{
const boost::urls::segments_view& urlSegments = urlView.segments();
boost::urls::url url("/");