clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: Idb72665dbadfa8afd569a2e0e254d84f0a2108d3
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/utils.cpp b/src/utils.cpp
index 0626543..09ed5d3 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -4,9 +4,10 @@
#include <openssl/evp.h>
+#include <phosphor-logging/log.hpp>
+
#include <algorithm>
#include <fstream>
-#include <phosphor-logging/log.hpp>
#include <sstream>
using namespace phosphor::logging;
@@ -24,7 +25,7 @@
namespace internal
{
template <typename... Ts>
-std::string concat_string(Ts const&... ts)
+std::string concat_string(const Ts&... ts)
{
std::stringstream s;
((s << ts << " "), ...) << std::endl;
@@ -34,7 +35,7 @@
// Helper function to run command
// Returns return code and the stdout
template <typename... Ts>
-std::pair<int, std::string> exec(Ts const&... ts)
+std::pair<int, std::string> exec(const Ts&... ts)
{
std::array<char, 512> buffer;
std::string cmd = concat_string(ts...);
@@ -176,8 +177,8 @@
{
return std::find_if(assocs.begin(), assocs.end(),
[&psuInventoryPath](const auto& assoc) {
- return psuInventoryPath == std::get<2>(assoc);
- }) != assocs.end();
+ return psuInventoryPath == std::get<2>(assoc);
+ }) != assocs.end();
}
any Utils::getPropertyImpl(sdbusplus::bus_t& bus, const char* service,