From 36b6b74679833866837d7bc412ba81ebd2c86136 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 25 Jul 2026 00:18:29 +0200 Subject: chore: minor cleanups --- kapi/kapi/capabilities/interface_id.hpp | 4 ++-- kapi/kapi/devices/device_registry.hpp | 6 +++--- .../test_support/filesystem/storage_boot_module_fixture.cpp | 9 ++++----- .../test_support/filesystem/storage_boot_module_fixture.hpp | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/kapi/kapi/capabilities/interface_id.hpp b/kapi/kapi/capabilities/interface_id.hpp index 2bd6097d..8e6870cc 100644 --- a/kapi/kapi/capabilities/interface_id.hpp +++ b/kapi/kapi/capabilities/interface_id.hpp @@ -1,5 +1,5 @@ -#ifndef TEACHOS_KAPI_CAPABILITIES_INTERFACE_HPP -#define TEACHOS_KAPI_CAPABILITIES_INTERFACE_HPP +#ifndef TEACHOS_KAPI_CAPABILITIES_INTERFACE_ID_HPP +#define TEACHOS_KAPI_CAPABILITIES_INTERFACE_ID_HPP // IWYU pragma: private diff --git a/kapi/kapi/devices/device_registry.hpp b/kapi/kapi/devices/device_registry.hpp index 00d04311..3952db66 100644 --- a/kapi/kapi/devices/device_registry.hpp +++ b/kapi/kapi/devices/device_registry.hpp @@ -1,5 +1,5 @@ -#ifndef TEACHOS_KAPI_DEVICES_MANAGER_HPP -#define TEACHOS_KAPI_DEVICES_MANAGER_HPP +#ifndef TEACHOS_KAPI_DEVICES_DEVICE_REGISTRY_HPP +#define TEACHOS_KAPI_DEVICES_DEVICE_REGISTRY_HPP // IWYU pragma: private, include @@ -26,7 +26,7 @@ namespace kapi::devices auto static get() -> device_registry &; - //! Add a new device tp the kernel's device registry. + //! Add a new device to the kernel's device registry. //! //! @param device The device to register. //! @return true if the device was registered successfully, false otherwise. diff --git a/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.cpp b/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.cpp index e19c3a69..3464c6e8 100644 --- a/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.cpp +++ b/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.cpp @@ -78,15 +78,16 @@ namespace kernel::tests::filesystem return *this; } - storage_boot_module_fixture::~storage_boot_module_fixture() {} + storage_boot_module_fixture::storage_boot_module_fixture() + { + m_boot_module_bus = kstd::make_shared(); + } auto storage_boot_module_fixture::setup_modules(std::size_t module_count, std::size_t module_size) -> void { m_module_names.clear(); m_module_data.clear(); - m_boot_module_bus = kstd::make_shared(); - m_module_names.reserve(module_count); m_module_data.reserve(module_count); @@ -116,8 +117,6 @@ namespace kernel::tests::filesystem m_module_names.clear(); m_module_data.clear(); - m_boot_module_bus = kstd::make_shared(); - if (module_names.size() != img_paths.size()) { throw std::invalid_argument{"Module names and image paths vectors must have the same size."}; diff --git a/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.hpp b/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.hpp index 990d640a..05830a91 100644 --- a/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.hpp +++ b/kernel/kernel/test_support/filesystem/storage_boot_module_fixture.hpp @@ -15,7 +15,7 @@ namespace kernel::tests::filesystem { struct storage_boot_module_fixture { - ~storage_boot_module_fixture(); + storage_boot_module_fixture(); auto setup_modules(std::size_t module_count, std::size_t module_size = 4096) -> void; auto setup_modules_from_img(std::vector const & module_names, -- cgit v1.2.3