diff options
Diffstat (limited to 'kapi')
| -rw-r--r-- | kapi/kapi/devices/facet_registry.hpp | 9 | ||||
| -rw-r--r-- | kapi/kapi/devices/power.hpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/kapi/kapi/devices/facet_registry.hpp b/kapi/kapi/devices/facet_registry.hpp index 7006c026..3c405923 100644 --- a/kapi/kapi/devices/facet_registry.hpp +++ b/kapi/kapi/devices/facet_registry.hpp @@ -150,7 +150,7 @@ namespace kapi::devices //! @param device The device to publish the facet for. //! @param name A stable name for the device. template<typename FacetType> - auto publish(kstd::shared_ptr<device> device, kstd::string name) -> kstd::result<void> + [[nodiscard]] auto publish(kstd::shared_ptr<device> device, kstd::string name) -> kstd::result<void> { if (!device) { @@ -172,7 +172,8 @@ namespace kapi::devices //! @param name A stable name for the device. //! @param facet The implementation of the facet for the device. template<typename FacetType> - auto publish(kstd::shared_ptr<device> device, kstd::string name, FacetType * facet) -> kstd::result<void> + [[nodiscard]] auto publish(kstd::shared_ptr<device> device, kstd::string name, FacetType * facet) + -> kstd::result<void> { return do_publish(device, std::move(name), FacetType::id, facet); } @@ -254,8 +255,8 @@ namespace kapi::devices //! @param name A stable name for the device. //! @param id The id of the facet to be published for the device. //! @param facet The facet of the device. - auto do_publish(kstd::shared_ptr<device> device, kstd::string name, kapi::capabilities::facet_id id, void * facet) - -> kstd::result<void>; + [[nodiscard]] auto do_publish(kstd::shared_ptr<device> device, kstd::string name, kapi::capabilities::facet_id id, + void * facet) -> kstd::result<void>; //! Notify all subscribed observers about a new facet having been published for a device. //! diff --git a/kapi/kapi/devices/power.hpp b/kapi/kapi/devices/power.hpp index 44837a65..a87ebc78 100644 --- a/kapi/kapi/devices/power.hpp +++ b/kapi/kapi/devices/power.hpp @@ -21,7 +21,7 @@ namespace kapi::devices //! //! @param root The root of the tree to suspend. //! @return nothing on success, the first error to occur otherwise. - auto suspend_tree(bus & root) -> kstd::result<void>; + [[nodiscard]] auto suspend_tree(bus & root) -> kstd::result<void>; //! Resume a device (sub-)tree rooted in a given bus. //! |
