aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
Diffstat (limited to 'kapi')
-rw-r--r--kapi/kapi/devices/bus.hpp2
-rw-r--r--kapi/kapi/devices/facet_registry.hpp9
-rw-r--r--kapi/kapi/devices/power.hpp2
-rw-r--r--kapi/kapi/filesystem.hpp2
-rw-r--r--kapi/kapi/memory/frame_allocator.hpp2
5 files changed, 9 insertions, 8 deletions
diff --git a/kapi/kapi/devices/bus.hpp b/kapi/kapi/devices/bus.hpp
index dc46dc3a..aaca462a 100644
--- a/kapi/kapi/devices/bus.hpp
+++ b/kapi/kapi/devices/bus.hpp
@@ -28,7 +28,7 @@ namespace kapi::devices
//! Construct a bus with the given name.
//!
//! @param name The name of the bus.
- bus(kstd::string const & name);
+ explicit bus(kstd::string const & name);
//! Construct a bus with the given name and protocol.
//!
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.
//!
diff --git a/kapi/kapi/filesystem.hpp b/kapi/kapi/filesystem.hpp
index 04630006..ab8a8f4a 100644
--- a/kapi/kapi/filesystem.hpp
+++ b/kapi/kapi/filesystem.hpp
@@ -119,4 +119,4 @@ namespace kapi::filesystem
//! @}
} // namespace kapi::filesystem
-#endif // TEACHOS_KAPI_FILESYSTEM_HPP \ No newline at end of file
+#endif \ No newline at end of file
diff --git a/kapi/kapi/memory/frame_allocator.hpp b/kapi/kapi/memory/frame_allocator.hpp
index 783bd3cb..12f56c2d 100644
--- a/kapi/kapi/memory/frame_allocator.hpp
+++ b/kapi/kapi/memory/frame_allocator.hpp
@@ -68,4 +68,4 @@ namespace kapi::memory
} // namespace kapi::memory
-#endif // TEACHOS_KAPI_MEMORY_FRAME_ALLOCATOR_HPP \ No newline at end of file
+#endif \ No newline at end of file