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/pid/builder.cpp b/pid/builder.cpp
index 706585a..505ca98 100644
--- a/pid/builder.cpp
+++ b/pid/builder.cpp
@@ -46,7 +46,7 @@
std::unordered_map<int64_t, std::shared_ptr<ZoneInterface>>
buildZones(const std::map<int64_t, conf::PIDConf>& zonePids,
- std::map<int64_t, struct conf::ZoneConfig>& zoneConfigs,
+ std::map<int64_t, conf::ZoneConfig>& zoneConfigs,
SensorManager& mgr, sdbusplus::bus::bus& modeControlBus)
{
std::unordered_map<int64_t, std::shared_ptr<ZoneInterface>> zones;
diff --git a/pid/builder.hpp b/pid/builder.hpp
index c07de74..5f03400 100644
--- a/pid/builder.hpp
+++ b/pid/builder.hpp
@@ -14,7 +14,7 @@
std::unordered_map<int64_t, std::shared_ptr<ZoneInterface>>
buildZones(const std::map<int64_t, conf::PIDConf>& zonePids,
- std::map<int64_t, struct conf::ZoneConfig>& zoneConfigs,
+ std::map<int64_t, conf::ZoneConfig>& zoneConfigs,
SensorManager& mgr, sdbusplus::bus::bus& modeControlBus);
}
diff --git a/pid/buildjson.cpp b/pid/buildjson.cpp
index c178293..e078fdb 100644
--- a/pid/buildjson.cpp
+++ b/pid/buildjson.cpp
@@ -118,14 +118,13 @@
}
} // namespace conf
-std::pair<std::map<int64_t, conf::PIDConf>,
- std::map<int64_t, struct conf::ZoneConfig>>
+std::pair<std::map<int64_t, conf::PIDConf>, std::map<int64_t, conf::ZoneConfig>>
buildPIDsFromJson(const json& data)
{
// zone -> pids
std::map<int64_t, conf::PIDConf> pidConfig;
// zone -> configs
- std::map<int64_t, struct conf::ZoneConfig> zoneConfig;
+ std::map<int64_t, conf::ZoneConfig> zoneConfig;
/* TODO: if zones is empty, that's invalid. */
auto zones = data["zones"];
@@ -133,7 +132,7 @@
{
int64_t id;
conf::PIDConf thisZone;
- struct conf::ZoneConfig thisZoneConfig;
+ conf::ZoneConfig thisZoneConfig;
/* TODO: using at() throws a specific exception we can catch */
id = zone["id"];
diff --git a/pid/buildjson.hpp b/pid/buildjson.hpp
index 5489c5a..56267fa 100644
--- a/pid/buildjson.hpp
+++ b/pid/buildjson.hpp
@@ -18,8 +18,7 @@
* @param[in] data - the json data
* @return the pidConfig, and the zoneConfig
*/
-std::pair<std::map<int64_t, conf::PIDConf>,
- std::map<int64_t, struct conf::ZoneConfig>>
+std::pair<std::map<int64_t, conf::PIDConf>, std::map<int64_t, conf::ZoneConfig>>
buildPIDsFromJson(const json& data);
} // namespace pid_control