clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I7b90380845efee6bf6a1fe342a793d71aa9ff181
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/phosphor-regulators/src/journal.cpp b/phosphor-regulators/src/journal.cpp
index 716a999..94a9f52 100644
--- a/phosphor-regulators/src/journal.cpp
+++ b/phosphor-regulators/src/journal.cpp
@@ -54,9 +54,8 @@
sd_journal* journal{nullptr};
};
-std::vector<std::string>
- SystemdJournal::getMessages(const std::string& field,
- const std::string& fieldValue, unsigned int max)
+std::vector<std::string> SystemdJournal::getMessages(
+ const std::string& field, const std::string& fieldValue, unsigned int max)
{
// Sleep 100ms; otherwise recent journal entries sometimes not available
using namespace std::chrono_literals;
@@ -67,8 +66,8 @@
int rc = sd_journal_open(&journal, SD_JOURNAL_LOCAL_ONLY);
if (rc < 0)
{
- throw std::runtime_error{std::string{"Failed to open journal: "} +
- strerror(-rc)};
+ throw std::runtime_error{
+ std::string{"Failed to open journal: "} + strerror(-rc)};
}
// Create object to automatically close journal
@@ -79,8 +78,8 @@
rc = sd_journal_add_match(journal, match.c_str(), 0);
if (rc < 0)
{
- throw std::runtime_error{std::string{"Failed to add journal match: "} +
- strerror(-rc)};
+ throw std::runtime_error{
+ std::string{"Failed to add journal match: "} + strerror(-rc)};
}
// Loop through matching entries from newest to oldest