mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +00:00
LibCore: Implement a move operator for Core::Process
We implement the move constructor already. A future commit will have code of the form: process = move(other_process); which there is no reason to forbid.
This commit is contained in:
parent
9fb84e4693
commit
8448897f14
Notes:
sideshowbarker
2024-07-17 06:28:38 +09:00
Author: https://github.com/trflynn89
Commit: 8448897f14
Pull-request: https://github.com/SerenityOS/serenity/pull/24092
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 6 additions and 1 deletions
|
@ -59,7 +59,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Process& operator=(Process&& other) = delete;
|
||||
Process& operator=(Process&& other)
|
||||
{
|
||||
m_pid = exchange(other.m_pid, 0);
|
||||
m_should_disown = exchange(other.m_should_disown, false);
|
||||
return *this;
|
||||
}
|
||||
|
||||
~Process()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue