clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I44441096113929ce96eb1439e2932e6ff3c87f27
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/libipmid/sdbus-asio.cpp b/libipmid/sdbus-asio.cpp
index fb71805..0f4cdaa 100644
--- a/libipmid/sdbus-asio.cpp
+++ b/libipmid/sdbus-asio.cpp
@@ -1,7 +1,8 @@
#include <boost/asio/io_context.hpp>
-#include <memory>
#include <sdbusplus/asio/connection.hpp>
+#include <memory>
+
namespace
{
diff --git a/libipmid/signals.cpp b/libipmid/signals.cpp
index 84287fc..757103a 100644
--- a/libipmid/signals.cpp
+++ b/libipmid/signals.cpp
@@ -1,8 +1,9 @@
#include <boost/asio/signal_set.hpp>
-#include <forward_list>
#include <ipmid/api.hpp>
-#include <memory>
#include <phosphor-logging/log.hpp>
+
+#include <forward_list>
+#include <memory>
#include <vector>
using namespace phosphor::logging;
@@ -100,8 +101,8 @@
if (!signals[signalNumber])
{
std::shared_ptr<boost::asio::io_context> io = getIoContext();
- signals[signalNumber] =
- std::make_unique<SignalHandler>(io, signalNumber);
+ signals[signalNumber] = std::make_unique<SignalHandler>(io,
+ signalNumber);
}
signals[signalNumber]->registerHandler(priority, handler);
}
diff --git a/libipmid/systemintf-sdbus.cpp b/libipmid/systemintf-sdbus.cpp
index abd30ec..a9a4e18 100644
--- a/libipmid/systemintf-sdbus.cpp
+++ b/libipmid/systemintf-sdbus.cpp
@@ -1,7 +1,8 @@
#include <ipmid/api.hpp>
-#include <memory>
#include <sdbusplus/asio/connection.hpp>
+#include <memory>
+
namespace
{
diff --git a/libipmid/utils.cpp b/libipmid/utils.cpp
index a2e4dd2..302c0b7 100644
--- a/libipmid/utils.cpp
+++ b/libipmid/utils.cpp
@@ -8,14 +8,15 @@
#include <sys/types.h>
#include <unistd.h>
-#include <algorithm>
-#include <chrono>
#include <ipmid/utils.hpp>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <sdbusplus/message/types.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
+#include <algorithm>
+#include <chrono>
+
namespace ipmi
{
@@ -82,10 +83,10 @@
}
// else search the match string in the object path
- auto found = std::find_if(
- objectTree.begin(), objectTree.end(), [&match](const auto& object) {
- return (object.first.find(match) != std::string::npos);
- });
+ auto found = std::find_if(objectTree.begin(), objectTree.end(),
+ [&match](const auto& object) {
+ return (object.first.find(match) != std::string::npos);
+ });
if (found == objectTree.end())
{
@@ -103,7 +104,6 @@
const std::string& property,
std::chrono::microseconds timeout)
{
-
Value value;
auto method = bus.new_method_call(service.c_str(), objPath.c_str(),
@@ -200,14 +200,12 @@
ServiceCache::ServiceCache(const std::string& intf, const std::string& path) :
intf(intf), path(path), cachedService(std::nullopt),
cachedBusName(std::nullopt)
-{
-}
+{}
ServiceCache::ServiceCache(std::string&& intf, std::string&& path) :
intf(std::move(intf)), path(std::move(path)), cachedService(std::nullopt),
cachedBusName(std::nullopt)
-{
-}
+{}
const std::string& ServiceCache::getService(sdbusplus::bus_t& bus)
{
@@ -241,10 +239,10 @@
std::string getService(sdbusplus::bus_t& bus, const std::string& intf,
const std::string& path)
{
- auto mapperCall =
- bus.new_method_call("xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper", "GetObject");
+ auto mapperCall = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper",
+ "GetObject");
mapperCall.append(path);
mapperCall.append(std::vector<std::string>({intf}));
@@ -462,10 +460,10 @@
}
// else search the match string in the object path
- auto found = std::find_if(
- objectTree.begin(), objectTree.end(), [&match](const auto& object) {
- return (object.first.find(match) != std::string::npos);
- });
+ auto found = std::find_if(objectTree.begin(), objectTree.end(),
+ [&match](const auto& object) {
+ return (object.first.find(match) != std::string::npos);
+ });
if (found == objectTree.end())
{