Make Fru Device publish uint on dbus for BUS
Make BUS and ADRESS both uin32_t instead of string as
that logically makes more sense.
Change-Id: Ia35cbc8bdc65bc98ad004517260c2253172cf7fe
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index c237346..1755e46 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -840,26 +840,22 @@
}
else
{
- std::string substitute;
+ bool found = false;
for (auto &foundDevicePair : foundDevice)
{
if (boost::iequals(foundDevicePair.first, templateValue))
{
- // convert value to string
- // respresentation
- subsitute = mapbox::util::apply_visitor(
- VariantToStringVisitor(), foundDevicePair.second);
+ mapbox::util::apply_visitor(
+ [&](auto &&val) { keyPair.value() = val; },
+ foundDevicePair.second);
+ found = true;
break;
}
}
- if (!substitute.size())
+ if (!found)
{
std::cerr << "could not find symbol " << templateValue << "\n";
}
- else
- {
- keyPair.value() = substitute;
- }
}
}
}