mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
Kernel: Avoid else after return in Process and ThreadSafeRefCounted
This commit is contained in:
parent
eb1181b898
commit
39993a8fab
2 changed files with 4 additions and 5 deletions
|
@ -100,9 +100,9 @@ public:
|
||||||
call_will_be_destroyed_if_present(static_cast<const T*>(this));
|
call_will_be_destroyed_if_present(static_cast<const T*>(this));
|
||||||
delete static_cast<const T*>(this);
|
delete static_cast<const T*>(this);
|
||||||
return true;
|
return true;
|
||||||
} else if (new_ref_count == 1) {
|
|
||||||
call_one_ref_left_if_present(static_cast<const T*>(this));
|
|
||||||
}
|
}
|
||||||
|
if (new_ref_count == 1)
|
||||||
|
call_one_ref_left_if_present(static_cast<const T*>(this));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -577,10 +577,9 @@ private:
|
||||||
{
|
{
|
||||||
if (g_profiling_all_threads)
|
if (g_profiling_all_threads)
|
||||||
return g_global_perf_events;
|
return g_global_perf_events;
|
||||||
else if (m_profiling)
|
if (m_profiling)
|
||||||
return m_perf_event_buffer.ptr();
|
return m_perf_event_buffer.ptr();
|
||||||
else
|
return nullptr;
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mutable IntrusiveListNode<Process> m_list_node;
|
mutable IntrusiveListNode<Process> m_list_node;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue