Enable clang-format
Ideally would have done this from the beginning,
but better later than never.
Change-Id: Ib4c73085c4817496c9f2ee505c19149a67b394dc
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/policy_find.cpp b/policy_find.cpp
index daf872c..b8b671a 100644
--- a/policy_find.cpp
+++ b/policy_find.cpp
@@ -35,10 +35,9 @@
*
* @return optional<T> - the property value
*/
-template<typename T>
-optional_ns::optional<T> getProperty(
- const DbusPropertyMap& properties,
- const std::string& name)
+template <typename T>
+optional_ns::optional<T> getProperty(const DbusPropertyMap& properties,
+ const std::string& name)
{
auto prop = properties.find(name);
@@ -61,13 +60,13 @@
*
* @return optional<std::string> - the data value
*/
-optional_ns::optional<std::string> getAdditionalDataItem(
- const std::vector<std::string>& additionalData,
- const std::string& name)
+optional_ns::optional<std::string>
+ getAdditionalDataItem(const std::vector<std::string>& additionalData,
+ const std::string& name)
{
for (const auto& item : additionalData)
{
- if (item.find(name+"=") != std::string::npos)
+ if (item.find(name + "=") != std::string::npos)
{
return item.substr(item.find('=') + 1);
}
@@ -91,8 +90,7 @@
* @return string - the search modifier
* may be empty if none found
*/
-auto getSearchModifier(
- const DbusPropertyMap& properties)
+auto getSearchModifier(const DbusPropertyMap& properties)
{
// The modifier may be one of several things within the
// AdditionalData property. Try them all until one
@@ -151,8 +149,8 @@
if (!value.empty())
{
- std::transform(
- value.begin(), value.end(), value.begin(), toupper);
+ std::transform(value.begin(), value.end(), value.begin(),
+ toupper);
return value;
}
}
@@ -167,12 +165,11 @@
return std::string{};
}
-PolicyProps find(
- const policy::Table& policy,
- const DbusPropertyMap& errorLogProperties)
+PolicyProps find(const policy::Table& policy,
+ const DbusPropertyMap& errorLogProperties)
{
- auto errorMsg = getProperty<std::string>(
- errorLogProperties, "Message"); //e.g. xyz.X.Error.Y
+ auto errorMsg = getProperty<std::string>(errorLogProperties,
+ "Message"); // e.g. xyz.X.Error.Y
if (errorMsg)
{
auto modifier = getSearchModifier(errorLogProperties);
@@ -192,7 +189,6 @@
return {policy.defaultEID(), policy.defaultMsg()};
}
-
}
}
}