From b91c49364df1683c7fe1191eb02b8d9c331874f6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 23 Apr 2021 16:46:57 +0200 Subject: AK: Rename adopt() to adopt_ref() This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.) --- Kernel/VM/PageDirectory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Kernel/VM/PageDirectory.h') diff --git a/Kernel/VM/PageDirectory.h b/Kernel/VM/PageDirectory.h index d965d883ec..6f1a5bfbe5 100644 --- a/Kernel/VM/PageDirectory.h +++ b/Kernel/VM/PageDirectory.h @@ -22,12 +22,12 @@ class PageDirectory : public RefCounted { public: static RefPtr create_for_userspace(const RangeAllocator* parent_range_allocator = nullptr) { - auto page_directory = adopt(*new PageDirectory(parent_range_allocator)); + auto page_directory = adopt_ref(*new PageDirectory(parent_range_allocator)); if (!page_directory->is_valid()) return {}; return page_directory; } - static NonnullRefPtr create_kernel_page_directory() { return adopt(*new PageDirectory); } + static NonnullRefPtr create_kernel_page_directory() { return adopt_ref(*new PageDirectory); } static RefPtr find_by_cr3(u32); ~PageDirectory(); -- cgit v1.2.3