clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Iea5dddb12203afff7e0495be7d2ea7183ffe8d1c
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/include/rde/rde_handler.hpp b/include/rde/rde_handler.hpp
index b11c4b8..019b43a 100644
--- a/include/rde/rde_handler.hpp
+++ b/include/rde/rde_handler.hpp
@@ -263,10 +263,10 @@
* @param[in] resourceId - PDR resource ID of the dictionary.
* @return RdeDecodeStatus
*/
- RdeDecodeStatus
- handleFlagStartAndEnd(std::span<const uint8_t> rdeCommand,
- const MultipartReceiveResHeader* header,
- const uint8_t* data, uint32_t resourceId);
+ RdeDecodeStatus handleFlagStartAndEnd(
+ std::span<const uint8_t> rdeCommand,
+ const MultipartReceiveResHeader* header, const uint8_t* data,
+ uint32_t resourceId);
};
} // namespace rde
diff --git a/src/rde/rde_dictionary_manager.cpp b/src/rde/rde_dictionary_manager.cpp
index aa92c51..6f6574a 100644
--- a/src/rde/rde_dictionary_manager.cpp
+++ b/src/rde/rde_dictionary_manager.cpp
@@ -61,8 +61,8 @@
return true;
}
-std::optional<std::span<const uint8_t>>
- DictionaryManager::getDictionary(uint32_t resourceId)
+std::optional<std::span<const uint8_t>> DictionaryManager::getDictionary(
+ uint32_t resourceId)
{
auto itemIt = dictionaries.find(resourceId);
if (itemIt == dictionaries.end())
diff --git a/src/rde/rde_handler.cpp b/src/rde/rde_handler.cpp
index 2b8a1e4..49641c8 100644
--- a/src/rde/rde_handler.cpp
+++ b/src/rde/rde_handler.cpp
@@ -47,8 +47,8 @@
return dictionaryManager.getDictionaryCount();
}
-RdeDecodeStatus
- RdeCommandHandler::operationInitRequest(std::span<const uint8_t> rdeCommand)
+RdeDecodeStatus RdeCommandHandler::operationInitRequest(
+ std::span<const uint8_t> rdeCommand)
{
const RdeOperationInitReqHeader* header =
reinterpret_cast<const RdeOperationInitReqHeader*>(rdeCommand.data());
@@ -119,8 +119,8 @@
return RdeDecodeStatus::RdeOk;
}
-RdeDecodeStatus
- RdeCommandHandler::multiPartReceiveResp(std::span<const uint8_t> rdeCommand)
+RdeDecodeStatus RdeCommandHandler::multiPartReceiveResp(
+ std::span<const uint8_t> rdeCommand)
{
const MultipartReceiveResHeader* header =
reinterpret_cast<const MultipartReceiveResHeader*>(rdeCommand.data());
@@ -190,8 +190,8 @@
return (crc ^ 0xFFFFFFFF);
}
-RdeDecodeStatus
- RdeCommandHandler::handleCrc(std::span<const uint8_t> multiReceiveRespCmd)
+RdeDecodeStatus RdeCommandHandler::handleCrc(
+ std::span<const uint8_t> multiReceiveRespCmd)
{
const MultipartReceiveResHeader* header =
reinterpret_cast<const MultipartReceiveResHeader*>(