diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-23 11:32:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-23 11:33:36 +0100 |
commit | 58fb3ebf660e87a7ac93b5e8a7433ff441e30639 (patch) | |
tree | 1c899f032c0f07a3a8a74649204b2fd06f0775a5 /Userland/Libraries/LibUSBDB | |
parent | c1c9da6c35ff3f28aefb6370dad898cb85e6bcef (diff) | |
download | serenity-58fb3ebf660e87a7ac93b5e8a7433ff441e30639.zip |
LibCore+AK: Move MappedFile from AK to LibCore
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
Diffstat (limited to 'Userland/Libraries/LibUSBDB')
-rw-r--r-- | Userland/Libraries/LibUSBDB/Database.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibUSBDB/Database.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibUSBDB/Database.cpp b/Userland/Libraries/LibUSBDB/Database.cpp index e42a0fa03f..140ca5bb65 100644 --- a/Userland/Libraries/LibUSBDB/Database.cpp +++ b/Userland/Libraries/LibUSBDB/Database.cpp @@ -14,7 +14,7 @@ namespace USBDB { RefPtr<Database> Database::open(const String& filename) { - auto file_or_error = MappedFile::map(filename); + auto file_or_error = Core::MappedFile::map(filename); if (file_or_error.is_error()) return nullptr; auto res = adopt_ref(*new Database(file_or_error.release_value())); diff --git a/Userland/Libraries/LibUSBDB/Database.h b/Userland/Libraries/LibUSBDB/Database.h index c1fa0cc9f1..207fedcc1e 100644 --- a/Userland/Libraries/LibUSBDB/Database.h +++ b/Userland/Libraries/LibUSBDB/Database.h @@ -7,12 +7,12 @@ #pragma once #include <AK/HashMap.h> -#include <AK/MappedFile.h> #include <AK/NonnullOwnPtr.h> #include <AK/RefCounted.h> #include <AK/RefPtr.h> #include <AK/String.h> #include <AK/StringView.h> +#include <LibCore/MappedFile.h> namespace USBDB { @@ -63,7 +63,7 @@ public: const StringView get_protocol(u8 class_id, u8 subclass_id, u8 protocol_id) const; private: - explicit Database(NonnullRefPtr<MappedFile> file) + explicit Database(NonnullRefPtr<Core::MappedFile> file) : m_file(move(file)) { } @@ -76,7 +76,7 @@ private: ClassMode, }; - NonnullRefPtr<MappedFile> m_file; + NonnullRefPtr<Core::MappedFile> m_file; StringView m_view {}; HashMap<int, NonnullOwnPtr<Vendor>> m_vendors; HashMap<int, NonnullOwnPtr<Class>> m_classes; |