mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 15:02:56 +00:00
Kernel: Tidy up ProcessProcFSTraits construction a bit more
Let the constructor take a Process& instead of a WeakPtr<Process> and avoid a bunch of WeakPtr copying.
This commit is contained in:
parent
b481132418
commit
db2e67fd53
Notes:
sideshowbarker
2024-07-18 04:32:08 +09:00
Author: https://github.com/awesomekling
Commit: db2e67fd53
2 changed files with 4 additions and 4 deletions
|
@ -718,7 +718,7 @@ public:
|
|||
|
||||
class ProcessProcFSTraits : public ProcFSExposedComponent {
|
||||
public:
|
||||
static KResultOr<NonnullRefPtr<ProcessProcFSTraits>> try_create(Badge<Process>, WeakPtr<Process> process)
|
||||
static KResultOr<NonnullRefPtr<ProcessProcFSTraits>> try_create(Badge<Process>, Process& process)
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) ProcessProcFSTraits(process));
|
||||
}
|
||||
|
@ -732,8 +732,8 @@ public:
|
|||
virtual GroupID owner_group() const override;
|
||||
|
||||
private:
|
||||
ProcessProcFSTraits(WeakPtr<Process> process)
|
||||
: m_process(process)
|
||||
explicit ProcessProcFSTraits(Process& process)
|
||||
: m_process(process.make_weak_ptr())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue