clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/image_upload.hpp b/include/image_upload.hpp
index 8b3dc10..202adc6 100644
--- a/include/image_upload.hpp
+++ b/include/image_upload.hpp
@@ -67,30 +67,30 @@
std::function<void(sdbusplus::message_t&)> callback =
[asyncResp](sdbusplus::message_t& m) {
- BMCWEB_LOG_DEBUG("Match fired");
+ BMCWEB_LOG_DEBUG("Match fired");
- sdbusplus::message::object_path path;
- dbus::utility::DBusInterfacesMap interfaces;
- m.read(path, interfaces);
+ sdbusplus::message::object_path path;
+ dbus::utility::DBusInterfacesMap interfaces;
+ m.read(path, interfaces);
- if (std::ranges::find_if(interfaces, [](const auto& i) {
- return i.first == "xyz.openbmc_project.Software.Version";
- }) != interfaces.end())
- {
- timeout.cancel();
- std::string leaf = path.filename();
- if (leaf.empty())
+ if (std::ranges::find_if(interfaces, [](const auto& i) {
+ return i.first == "xyz.openbmc_project.Software.Version";
+ }) != interfaces.end())
{
- leaf = path.str;
- }
+ timeout.cancel();
+ std::string leaf = path.filename();
+ if (leaf.empty())
+ {
+ leaf = path.str;
+ }
- asyncResp->res.jsonValue["data"] = leaf;
- asyncResp->res.jsonValue["message"] = "200 OK";
- asyncResp->res.jsonValue["status"] = "ok";
- BMCWEB_LOG_DEBUG("ending response");
- fwUpdateMatcher = nullptr;
- }
- };
+ asyncResp->res.jsonValue["data"] = leaf;
+ asyncResp->res.jsonValue["message"] = "200 OK";
+ asyncResp->res.jsonValue["status"] = "ok";
+ BMCWEB_LOG_DEBUG("ending response");
+ fwUpdateMatcher = nullptr;
+ }
+ };
fwUpdateMatcher = std::make_unique<sdbusplus::bus::match_t>(
*crow::connections::systemBus,
"interface='org.freedesktop.DBus.ObjectManager',type='signal',"
@@ -120,8 +120,8 @@
.methods(boost::beast::http::verb::post, boost::beast::http::verb::put)(
[](const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
- uploadImageHandler(req, asyncResp);
- });
+ uploadImageHandler(req, asyncResp);
+ });
}
} // namespace image_upload
} // namespace crow