diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
commit | b91c49364df1683c7fe1191eb02b8d9c331874f6 (patch) | |
tree | a9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /Userland/Libraries/LibELF | |
parent | b3db01e20eeae632cc75df9af8666772bda67091 (diff) | |
download | serenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip |
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.)
Diffstat (limited to 'Userland/Libraries/LibELF')
-rw-r--r-- | Userland/Libraries/LibELF/DynamicLoader.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibELF/DynamicObject.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp index 5eeac24cd5..d211617dfa 100644 --- a/Userland/Libraries/LibELF/DynamicLoader.cpp +++ b/Userland/Libraries/LibELF/DynamicLoader.cpp @@ -54,7 +54,7 @@ RefPtr<DynamicLoader> DynamicLoader::try_create(int fd, String filename) return {}; } - return adopt(*new DynamicLoader(fd, move(filename), data, size)); + return adopt_ref(*new DynamicLoader(fd, move(filename), data, size)); } DynamicLoader::DynamicLoader(int fd, String filename, void* data, size_t size) diff --git a/Userland/Libraries/LibELF/DynamicObject.cpp b/Userland/Libraries/LibELF/DynamicObject.cpp index cd101632ea..7c5b2957cf 100644 --- a/Userland/Libraries/LibELF/DynamicObject.cpp +++ b/Userland/Libraries/LibELF/DynamicObject.cpp @@ -444,7 +444,7 @@ auto DynamicObject::lookup_symbol(const StringView& name, u32 gnu_hash, u32 sysv NonnullRefPtr<DynamicObject> DynamicObject::create(const String& filename, VirtualAddress base_address, VirtualAddress dynamic_section_address) { - return adopt(*new DynamicObject(filename, base_address, dynamic_section_address)); + return adopt_ref(*new DynamicObject(filename, base_address, dynamic_section_address)); } // offset is in PLT relocation table |