mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
AK: Rename create<T> => make_ref_counted<T>
And also try_create<T> => try_make_ref_counted<T>. A global "create" was a bit much. The new name matches make<T> better, which we've used for making single-owner objects since forever.
This commit is contained in:
parent
43a800a838
commit
eaf88cc78a
17 changed files with 137 additions and 137 deletions
|
@ -19,7 +19,7 @@ KResultOr<NonnullRefPtr<Hub>> Hub::try_create_root_hub(NonnullRefPtr<USBControll
|
|||
if (pipe_or_error.is_error())
|
||||
return pipe_or_error.error();
|
||||
|
||||
auto hub = AK::try_create<Hub>(controller, device_speed, pipe_or_error.release_value());
|
||||
auto hub = try_make_ref_counted<Hub>(controller, device_speed, pipe_or_error.release_value());
|
||||
if (!hub)
|
||||
return ENOMEM;
|
||||
|
||||
|
@ -34,7 +34,7 @@ KResultOr<NonnullRefPtr<Hub>> Hub::try_create_from_device(Device const& device)
|
|||
if (pipe_or_error.is_error())
|
||||
return pipe_or_error.error();
|
||||
|
||||
auto hub = AK::try_create<Hub>(device, pipe_or_error.release_value());
|
||||
auto hub = try_make_ref_counted<Hub>(device, pipe_or_error.release_value());
|
||||
if (!hub)
|
||||
return ENOMEM;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue