From b99b79d8080cc1491f96069677d9ce0b7775a4f0 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 9 Sep 2026 23:02:20 +0200 Subject: chore: replace some naked pointers The coding guidelines explicitly prohibit the use of "naked"/C-style pointers. However, there were some prominent examples in the kapi and the core kernel source. This changeset replaces them with the appropriate smart pointer types. --- kernel/kapi/devices/bus.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kernel/kapi/devices/bus.cpp') diff --git a/kernel/kapi/devices/bus.cpp b/kernel/kapi/devices/bus.cpp index 300151d5..d956c3b8 100644 --- a/kernel/kapi/devices/bus.cpp +++ b/kernel/kapi/devices/bus.cpp @@ -84,15 +84,15 @@ namespace kapi::devices return m_devices; } - auto bus::query_facet(kapi::capabilities::facet_id facet) -> void * + auto bus::query_facet(kapi::capabilities::facet_id facet) -> kstd::observer_ptr { if (facet == bus::id) { - return this; + return kstd::observer_ptr(this); } else if (facet == bus_protocol::id) { - return m_protocol; + return kstd::observer_ptr{m_protocol}; } return device::query_facet(facet); -- cgit v1.2.3