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: I0f105c3310e87172c65a09a8787a2db5a4041cc0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/pid/buildjson.cpp b/pid/buildjson.cpp
index ddfeb71..feb3bb8 100644
--- a/pid/buildjson.cpp
+++ b/pid/buildjson.cpp
@@ -57,8 +57,8 @@
         findMissingAcceptable->get_to(missingAcceptableNames);
     }
 
-    c.inputs = spliceInputs(inputNames, inputTempToMargin,
-                            missingAcceptableNames);
+    c.inputs =
+        spliceInputs(inputNames, inputTempToMargin, missingAcceptableNames);
 
     /* TODO: We need to handle parsing other PID controller configurations.
      * We can do that by checking for different keys and making the decision
diff --git a/pid/fancontroller.cpp b/pid/fancontroller.cpp
index fc26243..378ef9b 100644
--- a/pid/fancontroller.cpp
+++ b/pid/fancontroller.cpp
@@ -28,10 +28,9 @@
 namespace pid_control
 {
 
-std::unique_ptr<PIDController>
-    FanController::createFanPid(ZoneInterface* owner, const std::string& id,
-                                const std::vector<std::string>& inputs,
-                                const ec::pidinfo& initial)
+std::unique_ptr<PIDController> FanController::createFanPid(
+    ZoneInterface* owner, const std::string& id,
+    const std::vector<std::string>& inputs, const ec::pidinfo& initial)
 {
     if (inputs.size() == 0)
     {
diff --git a/pid/fancontroller.hpp b/pid/fancontroller.hpp
index c2b76b9..700f651 100644
--- a/pid/fancontroller.hpp
+++ b/pid/fancontroller.hpp
@@ -19,15 +19,14 @@
 class FanController : public PIDController
 {
   public:
-    static std::unique_ptr<PIDController>
-        createFanPid(ZoneInterface* owner, const std::string& id,
-                     const std::vector<std::string>& inputs,
-                     const ec::pidinfo& initial);
+    static std::unique_ptr<PIDController> createFanPid(
+        ZoneInterface* owner, const std::string& id,
+        const std::vector<std::string>& inputs, const ec::pidinfo& initial);
 
     FanController(const std::string& id, const std::vector<std::string>& inputs,
                   ZoneInterface* owner) :
-        PIDController(id, owner),
-        _inputs(inputs), _direction(FanSpeedDirection::NEUTRAL)
+        PIDController(id, owner), _inputs(inputs),
+        _direction(FanSpeedDirection::NEUTRAL)
     {}
     ~FanController();
     double inputProc(void) override;
diff --git a/pid/stepwisecontroller.hpp b/pid/stepwisecontroller.hpp
index a3b3965..5a8dc3b 100644
--- a/pid/stepwisecontroller.hpp
+++ b/pid/stepwisecontroller.hpp
@@ -24,8 +24,7 @@
     StepwiseController(const std::string& id,
                        const std::vector<std::string>& inputs,
                        ZoneInterface* owner) :
-        Controller(),
-        _owner(owner), _id(id), _inputs(inputs)
+        Controller(), _owner(owner), _id(id), _inputs(inputs)
     {}
 
     double inputProc(void) override;
diff --git a/pid/thermalcontroller.cpp b/pid/thermalcontroller.cpp
index ddb5893..cf8564b 100644
--- a/pid/thermalcontroller.cpp
+++ b/pid/thermalcontroller.cpp
@@ -48,8 +48,8 @@
 
 bool isThermalType(const std::string& typeString)
 {
-    static const std::vector<std::string> thermalTypes = {"temp", "margin",
-                                                          "power", "powersum"};
+    static const std::vector<std::string> thermalTypes = {
+        "temp", "margin", "power", "powersum"};
     return std::count(thermalTypes.begin(), thermalTypes.end(), typeString);
 }
 
@@ -128,10 +128,10 @@
 
                 if (debugEnabled)
                 {
-                    std::cerr << "Converting temp to margin: temp "
-                              << cachedValue << ", Tjmax "
-                              << in.convertMarginZero << ", margin "
-                              << marginValue << "\n";
+                    std::cerr
+                        << "Converting temp to margin: temp " << cachedValue
+                        << ", Tjmax " << in.convertMarginZero << ", margin "
+                        << marginValue << "\n";
                 }
 
                 cachedValue = marginValue;
diff --git a/pid/thermalcontroller.hpp b/pid/thermalcontroller.hpp
index ac551d2..b199047 100644
--- a/pid/thermalcontroller.hpp
+++ b/pid/thermalcontroller.hpp
@@ -53,8 +53,7 @@
     ThermalController(const std::string& id,
                       const std::vector<pid_control::conf::SensorInput>& inputs,
                       const ThermalType& type, ZoneInterface* owner) :
-        PIDController(id, owner),
-        _inputs(inputs), type(type)
+        PIDController(id, owner), _inputs(inputs), type(type)
     {}
 
     double inputProc(void) override;
diff --git a/pid/zone.cpp b/pid/zone.cpp
index 5332efe..39ddc6d 100644
--- a/pid/zone.cpp
+++ b/pid/zone.cpp
@@ -617,9 +617,8 @@
     return _maximumSetPointName;
 }
 
-void DbusPidZone::updateThermalPowerDebugInterface(std::string pidName,
-                                                   std::string leader,
-                                                   double input, double output)
+void DbusPidZone::updateThermalPowerDebugInterface(
+    std::string pidName, std::string leader, double input, double output)
 {
     if (leader.empty())
     {
diff --git a/pid/zone_interface.hpp b/pid/zone_interface.hpp
index 31f3256..52639f8 100644
--- a/pid/zone_interface.hpp
+++ b/pid/zone_interface.hpp
@@ -115,10 +115,9 @@
     virtual void processThermals(void) = 0;
 
     /** Update thermal/power debug dbus properties */
-    virtual void updateThermalPowerDebugInterface(std::string pidName,
-                                                  std::string leader,
-                                                  double input,
-                                                  double output) = 0;
+    virtual void updateThermalPowerDebugInterface(
+        std::string pidName, std::string leader, double input,
+        double output) = 0;
 };
 
 } // namespace pid_control