diff options
author | Tom <tomut@yahoo.com> | 2020-08-21 11:39:30 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-22 10:46:24 +0200 |
commit | 5a98e329d157a2db8379e0c97c6bdc1328027843 (patch) | |
tree | 99fb2928e046fa7a6f69270ebed6ff8a8309dacd /Kernel/FileSystem | |
parent | 8a75e0b892ab8e1c4765ac4e2f7289b258f1bf5a (diff) | |
download | serenity-5a98e329d157a2db8379e0c97c6bdc1328027843.zip |
AK: Get rid of make_singleton function
Just default the InitFunction template argument.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/DevPtsFS.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/FIFO.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/FileSystem.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/Inode.cpp | 2 | ||||
-rw-r--r-- | Kernel/FileSystem/VirtualFileSystem.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/FileSystem/DevPtsFS.cpp b/Kernel/FileSystem/DevPtsFS.cpp index 2849b8f58b..7ee4d28aa0 100644 --- a/Kernel/FileSystem/DevPtsFS.cpp +++ b/Kernel/FileSystem/DevPtsFS.cpp @@ -46,7 +46,7 @@ DevPtsFS::~DevPtsFS() { } -static auto s_ptys = AK::make_singleton<HashTable<unsigned>>(); +static AK::Singleton<HashTable<unsigned>> s_ptys; bool DevPtsFS::initialize() { diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp index 52daa26f50..3b22a45c6a 100644 --- a/Kernel/FileSystem/FIFO.cpp +++ b/Kernel/FileSystem/FIFO.cpp @@ -38,7 +38,7 @@ namespace Kernel { -static auto s_table = AK::make_singleton<Lockable<HashTable<FIFO*>>>(); +static AK::Singleton<Lockable<HashTable<FIFO*>>> s_table; static Lockable<HashTable<FIFO*>>& all_fifos() { diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp index 2a96fb6e6c..49f1b284f3 100644 --- a/Kernel/FileSystem/FileSystem.cpp +++ b/Kernel/FileSystem/FileSystem.cpp @@ -38,7 +38,7 @@ namespace Kernel { static u32 s_lastFileSystemID; -static auto s_fs_map = AK::make_singleton<HashMap<u32, FS*>>(); +static AK::Singleton<HashMap<u32, FS*>> s_fs_map; static HashMap<u32, FS*>& all_fses() { diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp index edfba2eac9..e78f87bf59 100644 --- a/Kernel/FileSystem/Inode.cpp +++ b/Kernel/FileSystem/Inode.cpp @@ -39,7 +39,7 @@ namespace Kernel { static SpinLock s_all_inodes_lock; -static auto s_list = AK::make_singleton<InlineLinkedList<Inode>>(); +static AK::Singleton<InlineLinkedList<Inode>> s_list; InlineLinkedList<Inode>& Inode::all_with_lock() { diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index 9ea1a2d5c7..ea06d462c3 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -41,7 +41,7 @@ namespace Kernel { -static auto s_the = AK::make_singleton<VFS>(); +static AK::Singleton<VFS> s_the; static constexpr int symlink_recursion_limit { 5 }; // FIXME: increase? static constexpr int root_mount_flags = MS_NODEV | MS_NOSUID | MS_RDONLY; |