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: I152f141a5e8343b92b5ce81d3ca16eec77b5606b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/control/json/manager.cpp b/control/json/manager.cpp
index 8adc80c..fe5fc0d 100644
--- a/control/json/manager.cpp
+++ b/control/json/manager.cpp
@@ -168,12 +168,12 @@
         auto fans = getConfig<Fan>(false);
         for (auto& fan : fans)
         {
-            configKey fanProfile =
-                std::make_pair(fan.second->getZone(), fan.first.second);
-            auto itZone = std::find_if(
-                zones.begin(), zones.end(), [&fanProfile](const auto& zone) {
-                    return Manager::inConfig(fanProfile, zone.first);
-                });
+            configKey fanProfile = std::make_pair(fan.second->getZone(),
+                                                  fan.first.second);
+            auto itZone = std::find_if(zones.begin(), zones.end(),
+                                       [&fanProfile](const auto& zone) {
+                return Manager::inConfig(fanProfile, zone.first);
+            });
             if (itZone != zones.end())
             {
                 if (itZone->second->getTarget() != fan.second->getTarget() &&
@@ -271,21 +271,19 @@
     {
         // Profiles must have one match in the other's profiles(and they must be
         // an active profile) to be used in the config
-        return std::any_of(
-            input.second.begin(), input.second.end(),
-            [&comp](const auto& lProfile) {
-                return std::any_of(
-                    comp.second.begin(), comp.second.end(),
-                    [&lProfile](const auto& rProfile) {
-                        if (lProfile != rProfile)
-                        {
-                            return false;
-                        }
-                        auto activeProfs = getActiveProfiles();
-                        return std::find(activeProfs.begin(), activeProfs.end(),
-                                         lProfile) != activeProfs.end();
-                    });
+        return std::any_of(input.second.begin(), input.second.end(),
+                           [&comp](const auto& lProfile) {
+            return std::any_of(comp.second.begin(), comp.second.end(),
+                               [&lProfile](const auto& rProfile) {
+                if (lProfile != rProfile)
+                {
+                    return false;
+                }
+                auto activeProfs = getActiveProfiles();
+                return std::find(activeProfs.begin(), activeProfs.end(),
+                                 lProfile) != activeProfs.end();
             });
+        });
     }
 }
 
@@ -341,9 +339,10 @@
     // Set owner state for specific object given
     auto& ownIntf = _servTree[path][serv];
     ownIntf.first = isOwned;
-    auto itIntf = std::find_if(
-        ownIntf.second.begin(), ownIntf.second.end(),
-        [&intf](const auto& interface) { return intf == interface; });
+    auto itIntf = std::find_if(ownIntf.second.begin(), ownIntf.second.end(),
+                               [&intf](const auto& interface) {
+        return intf == interface;
+    });
     if (itIntf == std::end(ownIntf.second))
     {
         ownIntf.second.emplace_back(intf);
@@ -427,8 +426,8 @@
                 {
                     // Service not found in cache
                     auto intfs = {intf};
-                    pathIter->second[itServ.first] =
-                        std::make_pair(true, intfs);
+                    pathIter->second[itServ.first] = std::make_pair(true,
+                                                                    intfs);
                 }
             }
         }
@@ -680,11 +679,11 @@
 
                     // Look for the ObjectManager as an ancestor from the
                     // member.
-                    auto hasObjMgr = std::any_of(
-                        objMgrPaths.begin(), objMgrPaths.end(),
-                        [&member](const auto& path) {
-                            return member.find(path) != std::string::npos;
-                        });
+                    auto hasObjMgr = std::any_of(objMgrPaths.begin(),
+                                                 objMgrPaths.end(),
+                                                 [&member](const auto& path) {
+                        return member.find(path) != std::string::npos;
+                    });
 
                     if (!hasObjMgr)
                     {
@@ -745,12 +744,12 @@
     // Remove oneshot timers after they expired
     if (data.first == TimerType::oneshot)
     {
-        auto itTimer = std::find_if(
-            _timers.begin(), _timers.end(), [&data](const auto& timer) {
-                return (data.first == timer.first->first &&
-                        (std::get<std::string>(data.second) ==
-                         std::get<std::string>(timer.first->second)));
-            });
+        auto itTimer = std::find_if(_timers.begin(), _timers.end(),
+                                    [&data](const auto& timer) {
+            return (data.first == timer.first->first &&
+                    (std::get<std::string>(data.second) ==
+                     std::get<std::string>(timer.first->second)));
+        });
         if (itTimer != std::end(_timers))
         {
             _timers.erase(itTimer);
@@ -788,8 +787,8 @@
 void Manager::setProfiles()
 {
     // Profiles JSON config file is optional
-    auto confFile =
-        fan::JsonConfig::getConfFile(confAppName, Profile::confFileName, true);
+    auto confFile = fan::JsonConfig::getConfFile(confAppName,
+                                                 Profile::confFileName, true);
 
     _profiles.clear();
     if (!confFile.empty())
@@ -823,16 +822,16 @@
     {
         std::for_each(actions.begin(), actions.end(),
                       [&actList = it->second](auto& action) {
-                          actList.emplace_back(std::ref(action));
-                      });
+            actList.emplace_back(std::ref(action));
+        });
     }
     else
     {
         TriggerActions triggerActions;
         std::for_each(actions.begin(), actions.end(),
                       [&triggerActions](auto& action) {
-                          triggerActions.emplace_back(std::ref(action));
-                      });
+            triggerActions.emplace_back(std::ref(action));
+        });
         _parameterTriggers[name] = std::move(triggerActions);
     }
 }