mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
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.)
This commit is contained in:
parent
b3db01e20e
commit
b91c49364d
228 changed files with 461 additions and 461 deletions
|
@ -60,7 +60,7 @@ using IntrusiveRefPtrList = IntrusiveList<IntrusiveRefPtrItem, RefPtr<IntrusiveR
|
|||
|
||||
TEST_CASE(intrusive_ref_ptr_no_ref_leaks)
|
||||
{
|
||||
auto item = adopt(*new IntrusiveRefPtrItem());
|
||||
auto item = adopt_ref(*new IntrusiveRefPtrItem());
|
||||
EXPECT_EQ(1u, item->ref_count());
|
||||
IntrusiveRefPtrList ref_list;
|
||||
|
||||
|
@ -73,7 +73,7 @@ TEST_CASE(intrusive_ref_ptr_no_ref_leaks)
|
|||
|
||||
TEST_CASE(intrusive_ref_ptr_clear)
|
||||
{
|
||||
auto item = adopt(*new IntrusiveRefPtrItem());
|
||||
auto item = adopt_ref(*new IntrusiveRefPtrItem());
|
||||
EXPECT_EQ(1u, item->ref_count());
|
||||
IntrusiveRefPtrList ref_list;
|
||||
|
||||
|
@ -86,7 +86,7 @@ TEST_CASE(intrusive_ref_ptr_clear)
|
|||
|
||||
TEST_CASE(intrusive_ref_ptr_destructor)
|
||||
{
|
||||
auto item = adopt(*new IntrusiveRefPtrItem());
|
||||
auto item = adopt_ref(*new IntrusiveRefPtrItem());
|
||||
EXPECT_EQ(1u, item->ref_count());
|
||||
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ using IntrusiveNonnullRefPtrList = IntrusiveList<IntrusiveNonnullRefPtrItem, Non
|
|||
|
||||
TEST_CASE(intrusive_nonnull_ref_ptr_intrusive)
|
||||
{
|
||||
auto item = adopt(*new IntrusiveNonnullRefPtrItem());
|
||||
auto item = adopt_ref(*new IntrusiveNonnullRefPtrItem());
|
||||
EXPECT_EQ(1u, item->ref_count());
|
||||
IntrusiveNonnullRefPtrList nonnull_ref_list;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue