drop struct keyword for non-packed objects
As a style decision, struct is often used with packed structures to
indicate they are used like C-structs. Cleanup this codebase to not use
the extra struct keyword throughout.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I2f83bb1989e4d1f2f843ba3e45fb82e04f0fa61c
diff --git a/test/dbus_active_unittest.cpp b/test/dbus_active_unittest.cpp
index 6c640f8..3f06c96 100644
--- a/test/dbus_active_unittest.cpp
+++ b/test/dbus_active_unittest.cpp
@@ -42,13 +42,12 @@
std::string service = "asdfasdf.asdfasdf";
EXPECT_CALL(*helper, getProperties(service, path, NotNull()))
- .WillOnce(
- Invoke([&](const std::string& service, const std::string& path,
- struct SensorProperties* prop) {
- prop->scale = -3;
- prop->value = 10000;
- prop->unit = "x";
- }));
+ .WillOnce(Invoke([&](const std::string& service,
+ const std::string& path, SensorProperties* prop) {
+ prop->scale = -3;
+ prop->value = 10000;
+ prop->unit = "x";
+ }));
DbusActiveRead ar(bus_mock, path, service, std::move(helper));
diff --git a/test/dbus_passive_unittest.cpp b/test/dbus_passive_unittest.cpp
index a04b4ec..e6f07a0 100644
--- a/test/dbus_passive_unittest.cpp
+++ b/test/dbus_passive_unittest.cpp
@@ -56,7 +56,7 @@
std::string path = "/xyz/openbmc_project/sensors/unknown/id";
auto helper = std::make_unique<DbusHelperMock>();
- struct SensorProperties properties;
+ SensorProperties properties;
DbusPassive(bus_mock, type, id, std::move(helper), properties, false, path,
nullptr);
@@ -78,7 +78,7 @@
getProperties(StrEq("asdf"), StrEq(path), NotNull()))
.WillOnce(
Invoke([&](const std::string& service, const std::string& path,
- struct SensorProperties* prop) {
+ SensorProperties* prop) {
prop->scale = _scale;
prop->value = _value;
prop->unit = "x";
diff --git a/test/dbushelper_mock.hpp b/test/dbushelper_mock.hpp
index 44b3bea..0d4221d 100644
--- a/test/dbushelper_mock.hpp
+++ b/test/dbushelper_mock.hpp
@@ -17,7 +17,7 @@
MOCK_METHOD2(getService,
std::string(const std::string&, const std::string&));
MOCK_METHOD3(getProperties, void(const std::string&, const std::string&,
- struct SensorProperties*));
+ SensorProperties*));
MOCK_METHOD2(thresholdsAsserted,
bool(const std::string& service, const std::string& path));
diff --git a/test/pid_json_unittest.cpp b/test/pid_json_unittest.cpp
index 0e767f9..827d207 100644
--- a/test/pid_json_unittest.cpp
+++ b/test/pid_json_unittest.cpp
@@ -14,7 +14,7 @@
// This is technically invalid.
std::map<int64_t, conf::PIDConf> pidConfig;
- std::map<int64_t, struct conf::ZoneConfig> zoneConfig;
+ std::map<int64_t, conf::ZoneConfig> zoneConfig;
auto j2 = R"(
{
@@ -33,7 +33,7 @@
// Parse a valid configuration with one zone and one PID.
std::map<int64_t, conf::PIDConf> pidConfig;
- std::map<int64_t, struct conf::ZoneConfig> zoneConfig;
+ std::map<int64_t, conf::ZoneConfig> zoneConfig;
auto j2 = R"(
{
@@ -78,7 +78,7 @@
// Hysteresis parameters.
std::map<int64_t, conf::PIDConf> pidConfig;
- std::map<int64_t, struct conf::ZoneConfig> zoneConfig;
+ std::map<int64_t, conf::ZoneConfig> zoneConfig;
auto j2 = R"(
{
@@ -127,7 +127,7 @@
// Hysteresis parameters.
std::map<int64_t, conf::PIDConf> pidConfig;
- std::map<int64_t, struct conf::ZoneConfig> zoneConfig;
+ std::map<int64_t, conf::ZoneConfig> zoneConfig;
auto j2 = R"(
{