clang-format: update with latest
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I19356ecda2940a32661f54c0b54c74acc891f9c4
diff --git a/.clang-format b/.clang-format
index edcf98e..5f0cb09 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,7 +6,7 @@
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
-AlignOperands: true
+AlignOperands: Align
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Empty
@@ -75,6 +75,7 @@
- Regex: '.*'
Priority: 6
IndentCaseLabels: true
+IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
@@ -93,7 +94,10 @@
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
+QualifierAlignment: Left
+ReferenceAlignment: Left
ReflowComments: true
+RequiresClausePosition: OwnLine
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
diff --git a/include/sdbusplus/message/native_types.hpp b/include/sdbusplus/message/native_types.hpp
index ce3fbe5..287057f 100644
--- a/include/sdbusplus/message/native_types.hpp
+++ b/include/sdbusplus/message/native_types.hpp
@@ -309,7 +309,7 @@
using argument_type = sdbusplus::message::details::string_wrapper;
using result_type = std::size_t;
- result_type operator()(argument_type const& s) const
+ result_type operator()(const argument_type& s) const
{
return hash<std::string>()(s.str);
}
@@ -322,7 +322,7 @@
using argument_type = sdbusplus::message::details::string_path_wrapper;
using result_type = std::size_t;
- result_type operator()(argument_type const& s) const
+ result_type operator()(const argument_type& s) const
{
return hash<std::string>()(s.str);
}
diff --git a/include/sdbusplus/server/transaction.hpp b/include/sdbusplus/server/transaction.hpp
index 32f6fa3..844883f 100644
--- a/include/sdbusplus/server/transaction.hpp
+++ b/include/sdbusplus/server/transaction.hpp
@@ -67,7 +67,7 @@
struct hash<sdbusplus::server::transaction::Transaction>
{
size_t
- operator()(sdbusplus::server::transaction::Transaction const& t) const;
+ operator()(const sdbusplus::server::transaction::Transaction& t) const;
};
/** @ brief Overload of std::hash for details::Transaction */
@@ -75,7 +75,7 @@
struct hash<sdbusplus::server::transaction::details::Transaction>
{
size_t operator()(
- sdbusplus::server::transaction::details::Transaction const& t) const;
+ const sdbusplus::server::transaction::details::Transaction& t) const;
};
} // namespace std
diff --git a/src/server/transaction.cpp b/src/server/transaction.cpp
index f70bb37..bfd902a 100644
--- a/src/server/transaction.cpp
+++ b/src/server/transaction.cpp
@@ -75,7 +75,7 @@
}
size_t hash<sdbusplus::server::transaction::Transaction>::operator()(
- sdbusplus::server::transaction::Transaction const& t) const
+ const sdbusplus::server::transaction::Transaction& t) const
{
auto hash1 = std::hash<sdbusplus::bus_t>{}(t.bus);
auto hash2 = std::hash<sdbusplus::message_t>{}(t.msg);
@@ -86,7 +86,7 @@
}
size_t hash<sdbusplus::server::transaction::details::Transaction>::operator()(
- sdbusplus::server::transaction::details::Transaction const& t) const
+ const sdbusplus::server::transaction::details::Transaction& t) const
{
auto hash1 = std::hash<int>{}(t.time);
auto hash2 = std::hash<std::thread::id>{}(t.thread);