mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:57:35 +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
|
@ -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; }
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue