clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I555df8382455157bff44671b6f284e3121d5c182
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/src/handler.cpp b/src/handler.cpp
index 4f431d5..7705e3c 100644
--- a/src/handler.cpp
+++ b/src/handler.cpp
@@ -36,9 +36,9 @@
}
}
-std::vector<InterfaceMapType::value_type>
- getAncestors(const InterfaceMapType& interfaceMap, std::string reqPath,
- std::vector<std::string>& interfaces)
+std::vector<InterfaceMapType::value_type> getAncestors(
+ const InterfaceMapType& interfaceMap, std::string reqPath,
+ std::vector<std::string>& interfaces)
{
// Interfaces need to be sorted for intersect to function
std::sort(interfaces.begin(), interfaces.end());
@@ -135,9 +135,9 @@
return results;
}
-std::vector<InterfaceMapType::value_type>
- getSubTree(const InterfaceMapType& interfaceMap, std::string reqPath,
- int32_t depth, std::vector<std::string>& interfaces)
+std::vector<InterfaceMapType::value_type> getSubTree(
+ const InterfaceMapType& interfaceMap, std::string reqPath, int32_t depth,
+ std::vector<std::string>& interfaces)
{
if (depth <= 0)
{
@@ -203,9 +203,9 @@
return ret;
}
-std::vector<std::string>
- getSubTreePaths(const InterfaceMapType& interfaceMap, std::string reqPath,
- int32_t depth, std::vector<std::string>& interfaces)
+std::vector<std::string> getSubTreePaths(const InterfaceMapType& interfaceMap,
+ std::string reqPath, int32_t depth,
+ std::vector<std::string>& interfaces)
{
if (depth <= 0)
{
diff --git a/src/handler.hpp b/src/handler.hpp
index f6d4d94..be3bcd5 100644
--- a/src/handler.hpp
+++ b/src/handler.hpp
@@ -9,21 +9,21 @@
const std::string& objectPath,
const ConnectionNames::value_type& interfaceMap);
-std::vector<InterfaceMapType::value_type>
- getAncestors(const InterfaceMapType& interfaceMap, std::string reqPath,
- std::vector<std::string>& interfaces);
+std::vector<InterfaceMapType::value_type> getAncestors(
+ const InterfaceMapType& interfaceMap, std::string reqPath,
+ std::vector<std::string>& interfaces);
ConnectionNames getObject(const InterfaceMapType& interfaceMap,
const std::string& path,
std::vector<std::string>& interfaces);
-std::vector<InterfaceMapType::value_type>
- getSubTree(const InterfaceMapType& interfaceMap, std::string reqPath,
- int32_t depth, std::vector<std::string>& interfaces);
+std::vector<InterfaceMapType::value_type> getSubTree(
+ const InterfaceMapType& interfaceMap, std::string reqPath, int32_t depth,
+ std::vector<std::string>& interfaces);
-std::vector<std::string>
- getSubTreePaths(const InterfaceMapType& interfaceMap, std::string reqPath,
- int32_t depth, std::vector<std::string>& interfaces);
+std::vector<std::string> getSubTreePaths(const InterfaceMapType& interfaceMap,
+ std::string reqPath, int32_t depth,
+ std::vector<std::string>& interfaces);
/**
* @brief Get the Associated Sub Tree object
diff --git a/src/test/util/association_objects.hpp b/src/test/util/association_objects.hpp
index c547cf6..404654c 100644
--- a/src/test/util/association_objects.hpp
+++ b/src/test/util/association_objects.hpp
@@ -21,8 +21,8 @@
}
// Create a default AssociationInterfaces object
-AssociationInterfaces
- createDefaultInterfaceAssociation(sdbusplus::asio::object_server* server)
+AssociationInterfaces createDefaultInterfaceAssociation(
+ sdbusplus::asio::object_server* server)
{
AssociationInterfaces interfaceAssoc;