clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I289fffda3d8b39bb9b16eab30928d0aa7c8e1821
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index a75a2c2..e5530e6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -104,7 +104,7 @@
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyReturnTypeOnItsOwnLine: 150
PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
diff --git a/occ_ffdc.hpp b/occ_ffdc.hpp
index 072452d..e49d56b 100644
--- a/occ_ffdc.hpp
+++ b/occ_ffdc.hpp
@@ -166,8 +166,8 @@
*
* @return std::unique_ptr<FFDCFile> - The file object
*/
- static std::unique_ptr<FFDCFile>
- makeJsonFFDCFile(const nlohmann::json& ffdcData);
+ static std::unique_ptr<FFDCFile> makeJsonFFDCFile(
+ const nlohmann::json& ffdcData);
/**
* @brief Returns a JSON structure containing the previous N journal
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 36cacb9..df8ff0c 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -1164,8 +1164,8 @@
}
}
-std::optional<std::string>
- Manager::getPowerLabelFunctionID(const std::string& value)
+std::optional<std::string> Manager::getPowerLabelFunctionID(
+ const std::string& value)
{
// If the value is "system", then the FunctionID is "system".
if (value == "system")
diff --git a/occ_manager.hpp b/occ_manager.hpp
index 640f21e..fa44ed0 100644
--- a/occ_manager.hpp
+++ b/occ_manager.hpp
@@ -434,8 +434,8 @@
* @param[in] value - the value of the `powerX_label` file.
* @returns FunctionID of the power sensors.
*/
- std::optional<std::string>
- getPowerLabelFunctionID(const std::string& value);
+ std::optional<std::string> getPowerLabelFunctionID(
+ const std::string& value);
/** @brief The power sensor names map */
const std::map<std::string, std::string> powerSensorName = {
diff --git a/pldm.cpp b/pldm.cpp
index d835fbe..6893845 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -1068,8 +1068,8 @@
return 0;
}
-std::vector<uint8_t>
- Interface::encodeGetStateSensorRequest(uint8_t instance, uint16_t sensorId)
+std::vector<uint8_t> Interface::encodeGetStateSensorRequest(uint8_t instance,
+ uint16_t sensorId)
{
if (!getPldmInstanceId())
{
diff --git a/pldm.hpp b/pldm.hpp
index 6907a93..881061b 100644
--- a/pldm.hpp
+++ b/pldm.hpp
@@ -370,8 +370,8 @@
*
* @return request - The encoded PLDM messsage to be sent
*/
- std::vector<uint8_t>
- encodeGetStateSensorRequest(uint8_t instance, uint16_t sensorId);
+ std::vector<uint8_t> encodeGetStateSensorRequest(uint8_t instance,
+ uint16_t sensorId);
/** @brief setup PLDM transport for sending and receiving PLDM messages.
*