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: I47f3c815913ae34be19ce0d823fa233ed698d1a0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index d43e884..28e3328 100644
--- a/.clang-format
+++ b/.clang-format
@@ -87,7 +87,7 @@
IndentWrappedFunctionNames: true
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
@@ -98,13 +98,14 @@
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Left
diff --git a/manager/json-config.hpp b/manager/json-config.hpp
index eadf4b4..64441b3 100644
--- a/manager/json-config.hpp
+++ b/manager/json-config.hpp
@@ -70,17 +70,17 @@
*/
bool filePathExists(const std::vector<std::string>& names)
{
- auto it = std::find_if(names.begin(), names.end(),
- [this](const auto& name) {
- auto configFileName = name + ".json";
- auto configFilePath = fs::path{confBasePath} / configFileName;
- if (fs::exists(configFilePath))
- {
- confFile = configFilePath;
- return true;
- }
- return false;
- });
+ auto it =
+ std::find_if(names.begin(), names.end(), [this](const auto& name) {
+ auto configFileName = name + ".json";
+ auto configFilePath = fs::path{confBasePath} / configFileName;
+ if (fs::exists(configFilePath))
+ {
+ confFile = configFilePath;
+ return true;
+ }
+ return false;
+ });
return it == names.end() ? false : true;
}
@@ -160,8 +160,8 @@
try
{
// Get all objects implementing the compatible interface
- auto objects = dBusHandler.getSubTreePaths("/",
- confCompatibleInterface);
+ auto objects =
+ dBusHandler.getSubTreePaths("/", confCompatibleInterface);
for (const auto& path : objects)
{
try
diff --git a/manager/led-main.cpp b/manager/led-main.cpp
index 47d97dc..a18c793 100644
--- a/manager/led-main.cpp
+++ b/manager/led-main.cpp
@@ -80,9 +80,9 @@
/** Now create so many dbus objects as there are groups */
std::ranges::transform(systemLedMap, std::back_inserter(groups),
[&bus, &manager, serializePtr](auto& grp) {
- return std::make_unique<phosphor::led::Group>(bus, grp.first, manager,
- serializePtr);
- });
+ return std::make_unique<phosphor::led::Group>(
+ bus, grp.first, manager, serializePtr);
+ });
// Attach the bus to sd_event to service user requests
bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
diff --git a/manager/manager.hpp b/manager/manager.hpp
index caa7ba8..4e611b8 100644
--- a/manager/manager.hpp
+++ b/manager/manager.hpp
@@ -83,8 +83,8 @@
Manager(
sdbusplus::bus_t& bus, const GroupMap& ledLayout,
const sdeventplus::Event& event = sdeventplus::Event::get_default()) :
- ledMap(ledLayout),
- bus(bus), timer(event, [this](auto&) { driveLedsHandler(); })
+ ledMap(ledLayout), bus(bus),
+ timer(event, [this](auto&) { driveLedsHandler(); })
{
// Nothing here
}
diff --git a/test/utest.cpp b/test/utest.cpp
index 9508a1e..2bd222b 100644
--- a/test/utest.cpp
+++ b/test/utest.cpp
@@ -32,8 +32,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -63,8 +63,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -94,8 +94,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -119,8 +119,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/SingleLed";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
EXPECT_EQ(0, ledsAssert.size());
@@ -138,8 +138,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -173,8 +173,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -208,8 +208,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -237,8 +237,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -272,8 +272,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -301,8 +301,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -330,8 +330,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLeds";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
EXPECT_EQ(0, ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
@@ -348,8 +348,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsMix";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -387,8 +387,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -416,8 +416,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -451,8 +451,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -480,8 +480,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -514,8 +514,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -543,8 +543,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -571,8 +571,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
@@ -606,8 +606,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -635,8 +635,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -663,8 +663,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
@@ -710,8 +710,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -739,8 +739,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -768,8 +768,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
@@ -803,8 +803,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -832,8 +832,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -861,8 +861,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
@@ -908,8 +908,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -939,8 +939,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -964,8 +964,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAssserted populated with these.
@@ -997,8 +997,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1028,8 +1028,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these
@@ -1063,8 +1063,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.'Two' gets to Blink
@@ -1095,8 +1095,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1135,8 +1135,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1166,8 +1166,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1197,8 +1197,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -1238,8 +1238,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -1269,8 +1269,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
EXPECT_EQ(0, ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
@@ -1291,8 +1291,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1324,8 +1324,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1356,8 +1356,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAsssert populated with these.
@@ -1403,8 +1403,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1436,8 +1436,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1468,8 +1468,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsDeAsssert populated with these.
@@ -1514,8 +1514,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1547,8 +1547,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1590,8 +1590,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1623,8 +1623,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1655,8 +1655,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -1702,8 +1702,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1735,8 +1735,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, true, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, true, ledsAssert, ledsDeAssert);
EXPECT_EQ(true, result);
// Need just the ledsAssserted populated with these.
@@ -1767,8 +1767,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -1809,8 +1809,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsASet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
// Need just the ledsAssserted populated with these.
@@ -1842,8 +1842,8 @@
ActionSet ledsDeAssert{};
auto group = "/xyz/openbmc_project/ledmanager/groups/MultipleLedsBSet";
- auto result = manager.setGroupState(group, false, ledsAssert,
- ledsDeAssert);
+ auto result =
+ manager.setGroupState(group, false, ledsAssert, ledsDeAssert);
EXPECT_EQ(false, result);
EXPECT_EQ(0, ledsDeAssert.size());
EXPECT_EQ(0, ledsAssert.size());
diff --git a/utils.cpp b/utils.cpp
index 7b20ee1..70e40b7 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -37,9 +37,8 @@
}
// Get all properties
-const PropertyMap
- DBusHandler::getAllProperties(const std::string& objectPath,
- const std::string& interface) const
+const PropertyMap DBusHandler::getAllProperties(
+ const std::string& objectPath, const std::string& interface) const
{
PropertyMap properties;
@@ -61,10 +60,9 @@
}
// Get the property name
-const PropertyValue
- DBusHandler::getProperty(const std::string& objectPath,
- const std::string& interface,
- const std::string& propertyName) const
+const PropertyValue DBusHandler::getProperty(
+ const std::string& objectPath, const std::string& interface,
+ const std::string& propertyName) const
{
PropertyValue value{};
@@ -86,10 +84,9 @@
}
// Set property
-void DBusHandler::setProperty(const std::string& objectPath,
- const std::string& interface,
- const std::string& propertyName,
- const PropertyValue& value) const
+void DBusHandler::setProperty(
+ const std::string& objectPath, const std::string& interface,
+ const std::string& propertyName, const PropertyValue& value) const
{
auto& bus = DBusHandler::getBus();
auto service = getService(objectPath, interface);
@@ -105,9 +102,8 @@
bus.call_noreply(method);
}
-const std::vector<std::string>
- DBusHandler::getSubTreePaths(const std::string& objectPath,
- const std::string& interface)
+const std::vector<std::string> DBusHandler::getSubTreePaths(
+ const std::string& objectPath, const std::string& interface)
{
std::vector<std::string> paths;
diff --git a/utils.hpp b/utils.hpp
index 72e70e3..eb28e07 100644
--- a/utils.hpp
+++ b/utils.hpp
@@ -102,9 +102,8 @@
*
* @return std::vector<std::string> vector of subtree paths
*/
- const std::vector<std::string>
- getSubTreePaths(const std::string& objectPath,
- const std::string& interface);
+ const std::vector<std::string> getSubTreePaths(
+ const std::string& objectPath, const std::string& interface);
};
} // namespace utils