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:
Timothy Flynn 2024-04-23 19:06:23 -04:00 committed by Andrew Kaster
commit 8448897f14
Notes: sideshowbarker 2024-07-17 06:28:38 +09:00

View file

@ -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() ~Process()
{ {