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: Iabfeec3ff53427c317ef9c0b5bf06326ab9a1e17
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/mainloop.cpp b/mainloop.cpp
index 6fa74d3..52c3c64 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -217,8 +217,8 @@
     const auto& [sensorSysfsType, sensorSysfsNum] = sensorSetKey;
 
     /* Note: The sensor objects all share the same ioAccess object. */
-    auto sensorObj = std::make_unique<sensor::Sensor>(sensorSetKey, _ioAccess,
-                                                      _devPath);
+    auto sensorObj =
+        std::make_unique<sensor::Sensor>(sensorSetKey, _ioAccess, _devPath);
 
     // Get list of return codes for removing sensors on device
     auto devRmRCs = env::getEnv("REMOVERCS");
@@ -274,9 +274,9 @@
     }
     catch (const std::system_error& e)
     {
-        auto file = sysfs::make_sysfs_path(_ioAccess->path(), sensorSysfsType,
-                                           sensorSysfsNum,
-                                           hwmon::entry::cinput);
+        auto file =
+            sysfs::make_sysfs_path(_ioAccess->path(), sensorSysfsType,
+                                   sensorSysfsNum, hwmon::entry::cinput);
 
         // Check sensorAdjusts for sensor removal RCs
         auto& sAdjusts = sensorObj->getAdjusts();
@@ -315,8 +315,8 @@
                                  std::get<sensorID>(properties), sensorValue,
                                  info, scale);
 
-    auto target = addTarget<hwmon::FanSpeed>(sensorSetKey, _ioAccess, _devPath,
-                                             info);
+    auto target =
+        addTarget<hwmon::FanSpeed>(sensorSetKey, _ioAccess, _devPath, info);
     if (target)
     {
         target->enable();
@@ -339,9 +339,8 @@
                    const char* prefix, const char* root,
                    const std::string& instanceId,
                    const hwmonio::HwmonIOInterface* ioIntf) :
-    _bus(std::move(bus)),
-    _manager(_bus, root), _pathParam(param), _hwmonRoot(), _instance(),
-    _devPath(devPath), _prefix(prefix), _root(root), _state(),
+    _bus(std::move(bus)), _manager(_bus, root), _pathParam(param), _hwmonRoot(),
+    _instance(), _devPath(devPath), _prefix(prefix), _root(root), _state(),
     _instanceId(instanceId), _ioAccess(ioIntf),
     _event(sdeventplus::Event::get_default()),
     _timer(_event, std::bind(&MainLoop::read, this))
@@ -410,9 +409,9 @@
             // std::tuple<SensorSet::mapped_type,
             //            std::string(Sensor Label),
             //            ObjectInfo>
-            auto value = std::make_tuple(std::move(i.second),
-                                         std::move((*object).first),
-                                         std::move((*object).second));
+            auto value =
+                std::make_tuple(std::move(i.second), std::move((*object).first),
+                                std::move((*object).second));
 
             _state[std::move(i.first)] = std::move(value);
         }
@@ -514,8 +513,8 @@
 
                 // For sensors with attribute ASYNC_READ_TIMEOUT,
                 // spawn a thread with timeout
-                auto asyncReadTimeout = env::getEnv("ASYNC_READ_TIMEOUT",
-                                                    sensorSetKey);
+                auto asyncReadTimeout =
+                    env::getEnv("ASYNC_READ_TIMEOUT", sensorSetKey);
                 if (!asyncReadTimeout.empty())
                 {
                     std::chrono::milliseconds asyncTimeout{
@@ -529,9 +528,9 @@
                 {
                     // Retry for up to a second if device is busy
                     // or has a transient error.
-                    value = _ioAccess->read(sensorSysfsType, sensorSysfsNum,
-                                            input, hwmonio::retries,
-                                            hwmonio::delay);
+                    value =
+                        _ioAccess->read(sensorSysfsType, sensorSysfsNum, input,
+                                        hwmonio::retries, hwmonio::delay);
                 }
 
                 // Set functional property to true if we could read sensor
@@ -679,9 +678,9 @@
                     input = hwmon::entry::average;
                 }
                 // Sensor object added, erase entry from removal list
-                auto file = sysfs::make_sysfs_path(_ioAccess->path(),
-                                                   it->first.first,
-                                                   it->first.second, input);
+                auto file =
+                    sysfs::make_sysfs_path(_ioAccess->path(), it->first.first,
+                                           it->first.second, input);
 
                 log<level::INFO>("Added sensor to dbus after successful read",
                                  entry("FILE=%s", file.c_str()));