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/LibWeb/Loader | |
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/LibWeb/Loader')
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/Resource.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index 40ecda858c..8c1f6dd4c4 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -82,7 +82,7 @@ static bool build_image_document(DOM::Document& document, const ByteBuffer& data head_element->append_child(title_element); auto basename = LexicalPath(document.url().path()).basename(); - auto title_text = adopt(*new DOM::Text(document, String::formatted("{} [{}x{}]", basename, bitmap->width(), bitmap->height()))); + auto title_text = adopt_ref(*new DOM::Text(document, String::formatted("{} [{}x{}]", basename, bitmap->width(), bitmap->height()))); title_element->append_child(title_text); auto body_element = document.create_element("body"); diff --git a/Userland/Libraries/LibWeb/Loader/Resource.cpp b/Userland/Libraries/LibWeb/Loader/Resource.cpp index e5bed81e4e..9223145f96 100644 --- a/Userland/Libraries/LibWeb/Loader/Resource.cpp +++ b/Userland/Libraries/LibWeb/Loader/Resource.cpp @@ -15,8 +15,8 @@ namespace Web { NonnullRefPtr<Resource> Resource::create(Badge<ResourceLoader>, Type type, const LoadRequest& request) { if (type == Type::Image) - return adopt(*new ImageResource(request)); - return adopt(*new Resource(type, request)); + return adopt_ref(*new ImageResource(request)); + return adopt_ref(*new Resource(type, request)); } Resource::Resource(Type type, const LoadRequest& request) |