sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.
It is time to remove this boolean to make it more observable which
actions are being used in applications. Map all `true` occurrences to
`action::defer_emit` or `action::emit_no_signals` as appropriate.
- Value: defer_emit (primary object)
- Others: emit_no_signals (secondary objects)
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I892a1c953231123aa5407b388ff9133882d80feb
diff --git a/thresholds.hpp b/thresholds.hpp
index fe88977..d339ea8 100644
--- a/thresholds.hpp
+++ b/thresholds.hpp
@@ -129,10 +129,10 @@
auto tHi = env::getEnv(Thresholds<T>::envHi, sensorType, sensorID);
if (!tLo.empty() || !tHi.empty())
{
- static constexpr bool deferSignals = true;
auto& bus = *std::get<sdbusplus::bus::bus*>(info);
- iface = std::make_shared<T>(bus, objPath.c_str(), deferSignals);
+ iface = std::make_shared<T>(bus, objPath.c_str(),
+ T::action::emit_no_signals);
if (!tLo.empty())
{
auto lo = stod(tLo) * std::pow(10, scale);