summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-03 00:07:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-03 02:36:09 +0200
commiteaf88cc78a34edd9eab7f5bd5e29d30a10d3f565 (patch)
tree962179e77d781b80988412db54832791c476dd41 /Userland/Applications
parent43a800a83857709b0adca35f2f3a228680431ed0 (diff)
downloadserenity-eaf88cc78a34edd9eab7f5bd5e29d30a10d3f565.zip
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.
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Piano/Track.cpp4
-rw-r--r--Userland/Applications/PixelPaint/Guide.h2
-rw-r--r--Userland/Applications/PixelPaint/GuideTool.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/Piano/Track.cpp b/Userland/Applications/Piano/Track.cpp
index a51e7edeed..f077efc994 100644
--- a/Userland/Applications/Piano/Track.cpp
+++ b/Userland/Applications/Piano/Track.cpp
@@ -15,8 +15,8 @@
Track::Track(const u32& time)
: m_time(time)
- , m_temporary_transport(create<LibDSP::Transport>(120, 4))
- , m_delay(create<LibDSP::Effects::Delay>(m_temporary_transport))
+ , m_temporary_transport(make_ref_counted<LibDSP::Transport>(120, 4))
+ , m_delay(make_ref_counted<LibDSP::Effects::Delay>(m_temporary_transport))
{
set_volume(volume_max);
set_sustain_impl(1000);
diff --git a/Userland/Applications/PixelPaint/Guide.h b/Userland/Applications/PixelPaint/Guide.h
index 9592069270..6de1e5b59c 100644
--- a/Userland/Applications/PixelPaint/Guide.h
+++ b/Userland/Applications/PixelPaint/Guide.h
@@ -27,7 +27,7 @@ public:
static NonnullRefPtr<Guide> construct(Orientation orientation, float offset)
{
- return create<Guide>(orientation, offset);
+ return make_ref_counted<Guide>(orientation, offset);
};
Orientation orientation() const { return m_orientation; }
diff --git a/Userland/Applications/PixelPaint/GuideTool.cpp b/Userland/Applications/PixelPaint/GuideTool.cpp
index 6e851af457..33007c4472 100644
--- a/Userland/Applications/PixelPaint/GuideTool.cpp
+++ b/Userland/Applications/PixelPaint/GuideTool.cpp
@@ -64,9 +64,9 @@ void GuideTool::on_mousedown(Layer*, MouseEvent& event)
RefPtr<Guide> new_guide;
if (image_event.position().x() < 0 || image_event.position().x() > editor()->image().size().width()) {
- new_guide = Guide::construct(Guide::Orientation::Vertical, image_event.position().x());
+ new_guide = make_ref_counted<Guide>(Guide::Orientation::Vertical, image_event.position().x());
} else if (image_event.position().y() < 0 || image_event.position().y() > editor()->image().size().height()) {
- new_guide = Guide::construct(Guide::Orientation::Horizontal, image_event.position().y());
+ new_guide = make_ref_counted<Guide>(Guide::Orientation::Horizontal, image_event.position().y());
}
if (new_guide) {