1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:18:12 +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:
Andreas Kling 2021-04-23 16:46:57 +02:00
parent b3db01e20e
commit b91c49364d
228 changed files with 461 additions and 461 deletions

View file

@ -829,7 +829,7 @@ RefPtr<Value> CloseFdRedirection::run(RefPtr<Shell>)
{
Command command;
command.position = position();
command.redirections.append(adopt(*new CloseRedirection(m_fd)));
command.redirections.append(adopt_ref(*new CloseRedirection(m_fd)));
return create<CommandValue>(move(command));
}
@ -3249,7 +3249,7 @@ ListValue::ListValue(Vector<String> values)
return;
m_contained_values.ensure_capacity(values.size());
for (auto& str : values)
m_contained_values.append(adopt(*new StringValue(move(str))));
m_contained_values.append(adopt_ref(*new StringValue(move(str))));
}
NonnullRefPtr<Value> Value::with_slices(NonnullRefPtr<Slice> slice) const&
@ -3447,7 +3447,7 @@ Vector<String> TildeValue::resolve_as_list(RefPtr<Shell> shell)
Result<NonnullRefPtr<Rewiring>, String> CloseRedirection::apply() const
{
return adopt(*new Rewiring(fd, fd, Rewiring::Close::ImmediatelyCloseNew));
return adopt_ref(*new Rewiring(fd, fd, Rewiring::Close::ImmediatelyCloseNew));
}
CloseRedirection::~CloseRedirection()
@ -3462,7 +3462,7 @@ Result<NonnullRefPtr<Rewiring>, String> PathRedirection::apply() const
dbgln("open() failed for '{}' with {}", path, error);
return error;
}
return adopt(*new Rewiring(fd, my_fd, Rewiring::Close::Old));
return adopt_ref(*new Rewiring(fd, my_fd, Rewiring::Close::Old));
};
switch (direction) {
case AST::PathRedirection::WriteAppend: