sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9541d521bf67882215a4a66dce020e38ac2df065
diff --git a/powercap.cpp b/powercap.cpp
index 20a8f47..6a9c67f 100644
--- a/powercap.cpp
+++ b/powercap.cpp
@@ -142,7 +142,7 @@
auto occInput = getOccInput(newCap, pcapEnabled);
writeOcc(occInput);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format(
@@ -177,7 +177,7 @@
return std::get<uint32_t>(pcap);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to get PowerCap property",
entry("ERROR=%s", e.what()),
@@ -197,7 +197,7 @@
return std::get<bool>(pcapEnabled);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>("Failed to get PowerCapEnable property",
entry("ERROR=%s", e.what()),
@@ -320,7 +320,7 @@
return userCap;
}
-void PowerCap::pcapChanged(sdbusplus::message::message& msg)
+void PowerCap::pcapChanged(sdbusplus::message_t& msg)
{
if (!occStatus.occActive())
{
@@ -413,7 +413,7 @@
utils::setProperty(PCAP_PATH, PCAP_INTERFACE, POWER_CAP_SOFT_MIN,
softMin);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format(
@@ -428,7 +428,7 @@
utils::setProperty(PCAP_PATH, PCAP_INTERFACE, POWER_CAP_HARD_MIN,
hardMin);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format(
@@ -442,7 +442,7 @@
{
utils::setProperty(PCAP_PATH, PCAP_INTERFACE, POWER_CAP_MAX, max);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format(
@@ -468,7 +468,7 @@
utils::getProperty(PCAP_PATH, PCAP_INTERFACE, POWER_CAP_SOFT_MIN);
softMin = std::get<uint32_t>(prop);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format("readDbusPcapLimits: Failed to get SOFT PCAP due to {}",
@@ -484,7 +484,7 @@
utils::getProperty(PCAP_PATH, PCAP_INTERFACE, POWER_CAP_HARD_MIN);
hardMin = std::get<uint32_t>(prop);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format("readDbusPcapLimits: Failed to get HARD PCAP due to {}",
@@ -499,7 +499,7 @@
prop = utils::getProperty(PCAP_PATH, PCAP_INTERFACE, POWER_CAP_MAX);
max = std::get<uint32_t>(prop);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
log<level::ERR>(
fmt::format("readDbusPcapLimits: Failed to get MAX PCAP due to {}",