clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Other OpenBMC repos are doing the same.

Tested: Built and validator passed.
Change-Id: Ief26c755c9ce012823e16a506342b0547a53517a
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index 6e280c0..ca921e9 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -22,10 +22,10 @@
  * ids can be retrieved from Base.__ver__.json file.
  ***************************************************************/
 #pragma once
-#include <nlohmann/json.hpp>
-
 #include "http_response.h"
 
+#include <nlohmann/json.hpp>
+
 namespace redfish
 {
 
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 569c307..fb0cfbc 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -18,13 +18,14 @@
 
 #include <boost/asio/io_context.hpp>
 #include <boost/container/flat_map.hpp>
+#include <error_messages.hpp>
+#include <http_client.hpp>
+#include <utils/json_utils.hpp>
+
 #include <cstdlib>
 #include <ctime>
-#include <error_messages.hpp>
 #include <fstream>
-#include <http_client.hpp>
 #include <memory>
-#include <utils/json_utils.hpp>
 #include <variant>
 
 namespace redfish
@@ -69,8 +70,7 @@
             crow::connections::systemBus->get_io_context(), host, port, path);
     }
     ~Subscription()
-    {
-    }
+    {}
 
     void sendEvent(const std::string& msg)
     {
diff --git a/redfish-core/include/node.hpp b/redfish-core/include/node.hpp
index a6e1e27..c2c10d5 100644
--- a/redfish-core/include/node.hpp
+++ b/redfish-core/include/node.hpp
@@ -15,15 +15,16 @@
 */
 #pragma once
 
+#include "http_request.h"
+#include "http_response.h"
+
 #include "privileges.hpp"
 #include "token_authorization_middleware.hpp"
 #include "webserver_common.hpp"
 
 #include <error_messages.hpp>
-#include <vector>
 
-#include "http_request.h"
-#include "http_response.h"
+#include <vector>
 
 namespace redfish
 {
@@ -36,8 +37,7 @@
 {
   public:
     AsyncResp(crow::Response& response) : res(response)
-    {
-    }
+    {}
 
     ~AsyncResp()
     {
diff --git a/redfish-core/include/privileges.hpp b/redfish-core/include/privileges.hpp
index 35f619b..0282f35 100644
--- a/redfish-core/include/privileges.hpp
+++ b/redfish-core/include/privileges.hpp
@@ -17,10 +17,11 @@
 
 #include <logging.h>
 
-#include <array>
-#include <bitset>
 #include <boost/beast/http/verb.hpp>
 #include <boost/container/flat_map.hpp>
+
+#include <array>
+#include <bitset>
 #include <cstdint>
 #include <vector>
 
@@ -211,8 +212,7 @@
 
   private:
     Privileges(const std::bitset<maxPrivilegeCount>& p) : privilegeBitset{p}
-    {
-    }
+    {}
     std::bitset<maxPrivilegeCount> privilegeBitset = 0;
 };
 
diff --git a/redfish-core/include/utils/fw_utils.hpp b/redfish-core/include/utils/fw_utils.hpp
index 653b067..0fd02c7 100644
--- a/redfish-core/include/utils/fw_utils.hpp
+++ b/redfish-core/include/utils/fw_utils.hpp
@@ -1,5 +1,6 @@
 #pragma once
 #include <async_resp.hpp>
+
 #include <string>
 
 namespace redfish
@@ -7,11 +8,11 @@
 namespace fw_util
 {
 /* @brief String that indicates a bios firmware instance */
-constexpr const char *biosPurpose =
+constexpr const char* biosPurpose =
     "xyz.openbmc_project.Software.Version.VersionPurpose.Host";
 
 /* @brief String that indicates a BMC firmware instance */
-constexpr const char *bmcPurpose =
+constexpr const char* bmcPurpose =
     "xyz.openbmc_project.Software.Version.VersionPurpose.BMC";
 
 /**
@@ -24,14 +25,14 @@
  * @return void
  */
 void getActiveFwVersion(std::shared_ptr<AsyncResp> aResp,
-                        const std::string &fwVersionPurpose,
-                        const std::string &jsonIdxStr)
+                        const std::string& fwVersionPurpose,
+                        const std::string& jsonIdxStr)
 {
     // Get active FW images
     crow::connections::systemBus->async_method_call(
         [aResp, fwVersionPurpose,
          jsonIdxStr](const boost::system::error_code ec,
-                     const std::variant<std::vector<std::string>> &resp) {
+                     const std::variant<std::vector<std::string>>& resp) {
             if (ec)
             {
                 BMCWEB_LOG_ERROR << "error_code = " << ec;
@@ -39,7 +40,7 @@
                 messages::internalError(aResp->res);
                 return;
             }
-            const std::vector<std::string> *functionalFw =
+            const std::vector<std::string>* functionalFw =
                 std::get_if<std::vector<std::string>>(&resp);
             if ((functionalFw == nullptr) || (functionalFw->size() == 0))
             {
@@ -50,7 +51,7 @@
             // example functionalFw:
             // v as 2 "/xyz/openbmc_project/software/ace821ef"
             //        "/xyz/openbmc_project/software/230fb078"
-            for (auto &fw : *functionalFw)
+            for (auto& fw : *functionalFw)
             {
                 // if can't parse fw id then return
                 std::string::size_type idPos = fw.rfind("/");
@@ -74,7 +75,7 @@
                     [aResp, fw, swId, fwVersionPurpose, jsonIdxStr](
                         const boost::system::error_code ec,
                         const std::vector<std::pair<
-                            std::string, std::vector<std::string>>> &objInfo) {
+                            std::string, std::vector<std::string>>>& objInfo) {
                         if (ec)
                         {
                             BMCWEB_LOG_DEBUG << "error_code = " << ec;
@@ -109,7 +110,7 @@
                             [aResp, swId, fwVersionPurpose, jsonIdxStr](
                                 const boost::system::error_code ec,
                                 const boost::container::flat_map<
-                                    std::string, VariantType> &propertiesList) {
+                                    std::string, VariantType>& propertiesList) {
                                 if (ec)
                                 {
                                     BMCWEB_LOG_ERROR << "error_code = " << ec;
@@ -134,7 +135,7 @@
                                     messages::internalError(aResp->res);
                                     return;
                                 }
-                                const std::string *swInvPurpose =
+                                const std::string* swInvPurpose =
                                     std::get_if<std::string>(&it->second);
                                 if (swInvPurpose == nullptr)
                                 {
@@ -157,7 +158,7 @@
                                     messages::internalError(aResp->res);
                                     return;
                                 }
-                                const std::string *version =
+                                const std::string* version =
                                     std::get_if<std::string>(&it->second);
                                 if (version == nullptr)
                                 {
@@ -175,7 +176,7 @@
                     "xyz.openbmc_project.ObjectMapper",
                     "/xyz/openbmc_project/object_mapper",
                     "xyz.openbmc_project.ObjectMapper", "GetObject", fw,
-                    std::array<const char *, 1>{
+                    std::array<const char*, 1>{
                         "xyz.openbmc_project.Software.Activation"});
             }
         },
@@ -196,7 +197,7 @@
  *
  * @return The corresponding Redfish state
  */
-std::string getRedfishFWState(const std::string &fwState)
+std::string getRedfishFWState(const std::string& fwState)
 {
     if (fwState == "xyz.openbmc_project.Software.Activation.Activations.Active")
     {
@@ -228,7 +229,7 @@
  *
  * @return The corresponding Redfish health state
  */
-std::string getRedfishFWHealth(const std::string &fwState)
+std::string getRedfishFWHealth(const std::string& fwState)
 {
     if ((fwState ==
          "xyz.openbmc_project.Software.Activation.Activations.Active") ||
@@ -260,15 +261,15 @@
  */
 void getFwStatus(std::shared_ptr<AsyncResp> asyncResp,
                  const std::shared_ptr<std::string> swId,
-                 const std::string &dbusSvc)
+                 const std::string& dbusSvc)
 {
     BMCWEB_LOG_DEBUG << "getFwStatus: swId " << *swId << " svc " << dbusSvc;
 
     crow::connections::systemBus->async_method_call(
         [asyncResp,
          swId](const boost::system::error_code error_code,
-               const boost::container::flat_map<std::string, VariantType>
-                   &propertiesList) {
+               const boost::container::flat_map<std::string, VariantType>&
+                   propertiesList) {
             if (error_code)
             {
                 // not all fwtypes are updateable, this is ok
@@ -283,7 +284,7 @@
                 messages::propertyMissing(asyncResp->res, "Activation");
                 return;
             }
-            const std::string *swInvActivation =
+            const std::string* swInvActivation =
                 std::get_if<std::string>(&it->second);
             if (swInvActivation == nullptr)
             {
@@ -318,7 +319,7 @@
 {
     crow::connections::systemBus->async_method_call(
         [asyncResp, fwId](const boost::system::error_code ec,
-                          const std::variant<std::vector<std::string>> &resp) {
+                          const std::variant<std::vector<std::string>>& resp) {
             if (ec)
             {
                 BMCWEB_LOG_DEBUG << __FUNCTION__ << " error_code = " << ec
@@ -327,7 +328,7 @@
                 // so don't throw error here.
                 return;
             }
-            const std::vector<std::string> *objPaths =
+            const std::vector<std::string>* objPaths =
                 std::get_if<std::vector<std::string>>(&resp);
             if (objPaths)
             {
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index de732ce..d578de4 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -18,10 +18,11 @@
 #include <http_request.h>
 #include <http_response.h>
 
-#include <bitset>
 #include <error_messages.hpp>
 #include <nlohmann/json.hpp>
 
+#include <bitset>
+
 namespace redfish
 {
 
@@ -44,36 +45,35 @@
 namespace details
 {
 
-template <typename Type> struct is_optional : std::false_type
-{
-};
+template <typename Type>
+struct is_optional : std::false_type
+{};
 
 template <typename Type>
 struct is_optional<std::optional<Type>> : std::true_type
-{
-};
+{};
 
 template <typename Type>
 constexpr bool is_optional_v = is_optional<Type>::value;
 
-template <typename Type> struct is_vector : std::false_type
-{
-};
+template <typename Type>
+struct is_vector : std::false_type
+{};
 
-template <typename Type> struct is_vector<std::vector<Type>> : std::true_type
-{
-};
+template <typename Type>
+struct is_vector<std::vector<Type>> : std::true_type
+{};
 
-template <typename Type> constexpr bool is_vector_v = is_vector<Type>::value;
+template <typename Type>
+constexpr bool is_vector_v = is_vector<Type>::value;
 
-template <typename Type> struct is_std_array : std::false_type
-{
-};
+template <typename Type>
+struct is_std_array : std::false_type
+{};
 
 template <typename Type, std::size_t size>
 struct is_std_array<std::array<Type, size>> : std::true_type
-{
-};
+{};
 
 template <typename Type>
 constexpr bool is_std_array_v = is_std_array<Type>::value;