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: Ide19264aa5b2b01a5102b4b2a9cf226ba8dec699
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/sensorutils.hpp b/include/sensorutils.hpp
index 00e844d..766e9dc 100644
--- a/include/sensorutils.hpp
+++ b/include/sensorutils.hpp
@@ -77,10 +77,10 @@
return false;
}
sdbusplus::bus_t dbus(bus);
- auto mapperCall = dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper",
- "GetSubTree");
+ auto mapperCall =
+ dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetSubTree");
static constexpr const auto depth = 2;
static constexpr std::array<const char*, 3> interfaces = {
"xyz.openbmc_project.Sensor.Value",
@@ -164,10 +164,9 @@
return 0x1; // reading type = threshold
}
-static inline bool getSensorAttributes(const double max, const double min,
- int16_t& mValue, int8_t& rExp,
- int16_t& bValue, int8_t& bExp,
- bool& bSigned)
+static inline bool getSensorAttributes(
+ const double max, const double min, int16_t& mValue, int8_t& rExp,
+ int16_t& bValue, int8_t& bExp, bool& bSigned)
{
// computing y = (10^rRexp) * (Mx + (B*(10^Bexp)))
// check for 0, assume always positive
@@ -275,10 +274,9 @@
return true;
}
-static inline uint8_t
- scaleIPMIValueFromDouble(const double value, const uint16_t mValue,
- const int8_t rExp, const uint16_t bValue,
- const int8_t bExp, const bool bSigned)
+static inline uint8_t scaleIPMIValueFromDouble(
+ const double value, const uint16_t mValue, const int8_t rExp,
+ const uint16_t bValue, const int8_t bExp, const bool bSigned)
{
uint32_t scaledValue =
(value - (bValue * std::pow(10, bExp) * std::pow(10, rExp))) /