clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 5325849..1be7e02 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -1296,8 +1296,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1)
+nlohmann::json resourceAtUriInUnknownFormat(
+ const boost::urls::url_view_base& arg1)
{
return getLog(
redfish::registries::base::Index::resourceAtUriInUnknownFormat,
@@ -1340,8 +1340,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- couldNotEstablishConnection(const boost::urls::url_view_base& arg1)
+nlohmann::json couldNotEstablishConnection(
+ const boost::urls::url_view_base& arg1)
{
return getLog(redfish::registries::base::Index::couldNotEstablishConnection,
std::to_array<std::string_view>({arg1.buffer()}));
@@ -1818,8 +1818,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- actionParameterValueConflict(std::string_view arg1, std::string_view arg2)
+nlohmann::json actionParameterValueConflict(std::string_view arg1,
+ std::string_view arg2)
{
return getLog(
redfish::registries::base::Index::actionParameterValueConflict,
diff --git a/redfish-core/src/filter_expr_executor.cpp b/redfish-core/src/filter_expr_executor.cpp
index 4d92ea1..838fa64 100644
--- a/redfish-core/src/filter_expr_executor.cpp
+++ b/redfish-core/src/filter_expr_executor.cpp
@@ -121,14 +121,14 @@
return {x};
}
-ValueVisitor::result_type
- ValueVisitor::operator()(const filter_ast::QuotedString& x)
+ValueVisitor::result_type ValueVisitor::operator()(
+ const filter_ast::QuotedString& x)
{
return {x};
}
-ValueVisitor::result_type
- ValueVisitor::operator()(const filter_ast::UnquotedString& x)
+ValueVisitor::result_type ValueVisitor::operator()(
+ const filter_ast::UnquotedString& x)
{
// find key including paths with / in them
const nlohmann::json* it =
diff --git a/redfish-core/src/filter_expr_printer.cpp b/redfish-core/src/filter_expr_printer.cpp
index 90101fd..8c7f3b2 100644
--- a/redfish-core/src/filter_expr_printer.cpp
+++ b/redfish-core/src/filter_expr_printer.cpp
@@ -35,8 +35,8 @@
{
return std::format("int({})", x);
}
-std::string
- FilterExpressionPrinter::operator()(const filter_ast::QuotedString& x) const
+std::string FilterExpressionPrinter::operator()(
+ const filter_ast::QuotedString& x) const
{
return std::format("quoted_string(\"{}\")", static_cast<std::string>(x));
}
@@ -46,8 +46,8 @@
return std::format("unquoted_string(\"{}\")", static_cast<std::string>(x));
}
-std::string
- FilterExpressionPrinter::operator()(const filter_ast::LogicalNot& x) const
+std::string FilterExpressionPrinter::operator()(
+ const filter_ast::LogicalNot& x) const
{
std::string prefix;
std::string postfix;
@@ -58,8 +58,8 @@
}
return std::format("{}{}{}", prefix, (*this)(x.operand), postfix);
}
-std::string
- FilterExpressionPrinter::operator()(const filter_ast::LogicalOr& x) const
+std::string FilterExpressionPrinter::operator()(
+ const filter_ast::LogicalOr& x) const
{
std::string prefix;
std::string postfix;
@@ -77,8 +77,8 @@
return out;
}
-std::string
- FilterExpressionPrinter::operator()(const filter_ast::LogicalAnd& x) const
+std::string FilterExpressionPrinter::operator()(
+ const filter_ast::LogicalAnd& x) const
{
std::string prefix;
std::string postfix;
@@ -117,8 +117,8 @@
}
}
-std::string
- FilterExpressionPrinter::operator()(const filter_ast::Comparison& x) const
+std::string FilterExpressionPrinter::operator()(
+ const filter_ast::Comparison& x) const
{
std::string left = boost::apply_visitor(*this, x.left);
std::string right = boost::apply_visitor(*this, x.right);
diff --git a/redfish-core/src/resource_messages.cpp b/redfish-core/src/resource_messages.cpp
index 00023a8..0bda0b0 100644
--- a/redfish-core/src/resource_messages.cpp
+++ b/redfish-core/src/resource_messages.cpp
@@ -107,8 +107,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- resourceErrorThresholdExceeded(std::string_view arg1, std::string_view arg2)
+nlohmann::json resourceErrorThresholdExceeded(std::string_view arg1,
+ std::string_view arg2)
{
return getLog(redfish::registries::resource_event::Index::
resourceErrorThresholdExceeded,
@@ -122,8 +122,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- resourceErrorThresholdCleared(std::string_view arg1, std::string_view arg2)
+nlohmann::json resourceErrorThresholdCleared(std::string_view arg1,
+ std::string_view arg2)
{
return getLog(redfish::registries::resource_event::Index::
resourceErrorThresholdCleared,
@@ -182,8 +182,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- resourceStatusChangedWarning(std::string_view arg1, std::string_view arg2)
+nlohmann::json resourceStatusChangedWarning(std::string_view arg1,
+ std::string_view arg2)
{
return getLog(redfish::registries::resource_event::Index::
resourceStatusChangedWarning,
@@ -197,8 +197,8 @@
* See header file for more information
* @endinternal
*/
-nlohmann::json
- resourceStatusChangedCritical(std::string_view arg1, std::string_view arg2)
+nlohmann::json resourceStatusChangedCritical(std::string_view arg1,
+ std::string_view arg2)
{
return getLog(redfish::registries::resource_event::Index::
resourceStatusChangedCritical,
diff --git a/redfish-core/src/utils/time_utils.cpp b/redfish-core/src/utils/time_utils.cpp
index 1543758..ce39287 100644
--- a/redfish-core/src/utils/time_utils.cpp
+++ b/redfish-core/src/utils/time_utils.cpp
@@ -238,19 +238,19 @@
// https://howardhinnant.github.io/date_algorithms.html#civil_from_days
// All constants are explained in the above
template <class IntType>
-constexpr std::tuple<IntType, unsigned, unsigned>
- civilFromDays(IntType z) noexcept
+constexpr std::tuple<IntType, unsigned, unsigned> civilFromDays(
+ IntType z) noexcept
{
z += 719468;
IntType era = (z >= 0 ? z : z - 146096) / 146097;
unsigned doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
unsigned yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) /
- 365; // [0, 399]
+ 365; // [0, 399]
IntType y = static_cast<IntType>(yoe) + era * 400;
unsigned doy = doe - (365 * yoe + yoe / 4 - yoe / 100); // [0, 365]
- unsigned mp = (5 * doy + 2) / 153; // [0, 11]
- unsigned d = doy - (153 * mp + 2) / 5 + 1; // [1, 31]
- unsigned m = mp < 10 ? mp + 3 : mp - 9; // [1, 12]
+ unsigned mp = (5 * doy + 2) / 153; // [0, 11]
+ unsigned d = doy - (153 * mp + 2) / 5 + 1; // [1, 31]
+ unsigned m = mp < 10 ? mp + 3 : mp - 9; // [1, 12]
return std::tuple<IntType, unsigned, unsigned>(y + (m <= 2), m, d);
}