Skip to content

Commit

Permalink
sdbusplus: use shorter type aliases
Browse files Browse the repository at this point in the history
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

Change-Id: Ie3b9c52f1fe18c89432ee7eb5d8023e028565541
Signed-off-by: Patrick Williams <[email protected]>
  • Loading branch information
williamspatrick authored and wltu committed May 19, 2023
1 parent 1209ccc commit 6537122
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ using ArrayOfObjectPathsAndTieredAnyTypeLists = std::vector<

} // namespace

sdbusplus::bus::bus Handler::getDbus() const
sdbusplus::bus_t Handler::getDbus() const
{
return sdbusplus::bus::new_default();
}
Expand Down
2 changes: 1 addition & 1 deletion handler_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Handler : public HandlerInterface

protected:
// Exposed for dependency injection
virtual sdbusplus::bus::bus getDbus() const;
virtual sdbusplus::bus_t getDbus() const;

private:
std::string _configFile;
Expand Down
2 changes: 1 addition & 1 deletion test/handler_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class MockDbusHandler : public Handler
}

protected:
sdbusplus::bus::bus getDbus() const override
sdbusplus::bus_t getDbus() const override
{
return sdbusplus::get_mocked_new(
const_cast<sdbusplus::SdBusMock*>(mock_));
Expand Down

0 comments on commit 6537122

Please sign in to comment.