Make list single line
Making this list a single, alphabetized list reduces the possibility we
get merge conflicts when people add things to this, and make it easier
to read.
Tested:
Code compiles. Whitespace changes.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ife51344f3c77d3af866f278de1724a62c565c17c
diff --git a/src/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index b27cecc..d1d385c 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -69,12 +69,37 @@
"xyz.openbmc_project.Configuration.TPS546D24",
"xyz.openbmc_project.Configuration.XDPE12284"})};
-static std::vector<std::string> pmbusNames = {
- "adm1266", "adm1272", "adm1275", "adm1278", "dps800", "ina219",
- "ina230", "ipsps1", "isl68137", "isl68220", "isl68223", "isl69243",
- "isl69260", "lm25066", "max16601", "max20710", "max20730", "max20734",
- "max20796", "max34451", "pmbus", "pxe1610", "raa228000", "raa228228",
- "raa229004", "tps546d24", "xdpe12284"};
+// clang-format off
+static constexpr auto pmbusNames{std::to_array<const char*>({
+ "adm1266",
+ "adm1272",
+ "adm1275",
+ "adm1278",
+ "dps800",
+ "ina219",
+ "ina230",
+ "ipsps1",
+ "isl68137",
+ "isl68220",
+ "isl68223",
+ "isl69243",
+ "isl69260",
+ "lm25066",
+ "max16601",
+ "max20710",
+ "max20730",
+ "max20734",
+ "max20796",
+ "max34451",
+ "pmbus",
+ "pxe1610",
+ "raa228000",
+ "raa228228",
+ "raa229004",
+ "tps546d24",
+ "xdpe12284"
+})};
+//clang-format on
namespace fs = std::filesystem;