Use SensorBaseConfigMap where applicable
If we've got a more concise, descriptive name for it, we might as well
use it.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Id2f1bd8f983b4e0c2ca24b24c9fc9b875f4191f5
diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
index 1a98035..f97c71c 100644
--- a/include/CPUSensor.hpp
+++ b/include/CPUSensor.hpp
@@ -58,8 +58,7 @@
// this is added to cpusensor.hpp to avoid having every sensor have to link
// against libgpiod, if another sensor needs it we may move it to utils
-inline bool cpuIsPresent(
- const boost::container::flat_map<std::string, BasicVariantType>& gpioConfig)
+inline bool cpuIsPresent(const SensorBaseConfigMap& gpioConfig)
{
static boost::container::flat_map<std::string, bool> cpuPresence;
diff --git a/include/Utils.hpp b/include/Utils.hpp
index 8fc5e80..92a8b6f 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -127,9 +127,7 @@
} // namespace association
template <typename T>
-inline T loadVariant(
- const boost::container::flat_map<std::string, BasicVariantType>& data,
- const std::string& key)
+inline T loadVariant(const SensorBaseConfigMap& data, const std::string& key)
{
auto it = data.find(key);
if (it == data.end())
@@ -213,10 +211,8 @@
std::shared_ptr<GetSensorConfiguration> self = shared_from_this();
self->dbusConnection->async_method_call(
- [self, path, interface, owner,
- retries](const boost::system::error_code ec,
- boost::container::flat_map<std::string, BasicVariantType>&
- data) {
+ [self, path, interface, owner, retries](
+ const boost::system::error_code ec, SensorBaseConfigMap& data) {
if (ec)
{
std::cerr << "Error getting " << path << ": retries left"