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: Ib7af6345a7b9e858700bd81645fe87d9d7e9d0fb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/PSUSensor.cpp b/src/PSUSensor.cpp
index db632b6..3c02b93 100644
--- a/src/PSUSensor.cpp
+++ b/src/PSUSensor.cpp
@@ -44,17 +44,16 @@
static constexpr bool debug = false;
-PSUSensor::PSUSensor(const std::string& path, const std::string& objectType,
- sdbusplus::asio::object_server& objectServer,
- std::shared_ptr<sdbusplus::asio::connection>& conn,
- boost::asio::io_context& io, const std::string& sensorName,
- std::vector<thresholds::Threshold>&& thresholdsIn,
- const std::string& sensorConfiguration,
- const PowerState& powerState,
- const std::string& sensorUnits, unsigned int factor,
- double max, double min, double offset,
- const std::string& label, size_t tSize, double pollRate,
- const std::shared_ptr<I2CDevice>& i2cDevice) :
+PSUSensor::PSUSensor(
+ const std::string& path, const std::string& objectType,
+ sdbusplus::asio::object_server& objectServer,
+ std::shared_ptr<sdbusplus::asio::connection>& conn,
+ boost::asio::io_context& io, const std::string& sensorName,
+ std::vector<thresholds::Threshold>&& thresholdsIn,
+ const std::string& sensorConfiguration, const PowerState& powerState,
+ const std::string& sensorUnits, unsigned int factor, double max, double min,
+ double offset, const std::string& label, size_t tSize, double pollRate,
+ const std::shared_ptr<I2CDevice>& i2cDevice) :
Sensor(escapeName(sensorName), std::move(thresholdsIn), sensorConfiguration,
objectType, false, false, max, min, conn, powerState),
i2cDevice(i2cDevice), objServer(objectServer),
@@ -168,14 +167,14 @@
0, boost::asio::buffer(buffer->data(), buffer->size() - 1),
[weak, buffer{buffer}](const boost::system::error_code& ec,
size_t bytesRead) {
- std::shared_ptr<PSUSensor> self = weak.lock();
- if (!self)
- {
- return;
- }
+ std::shared_ptr<PSUSensor> self = weak.lock();
+ if (!self)
+ {
+ return;
+ }
- self->handleResponse(ec, bytesRead);
- });
+ self->handleResponse(ec, bytesRead);
+ });
}
void PSUSensor::restartRead()