mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
Kernel: Avoid else after return in Process and ThreadSafeRefCounted
This commit is contained in:
parent
eb1181b898
commit
39993a8fab
Notes:
sideshowbarker
2024-07-18 01:06:45 +09:00
Author: https://github.com/ADKaster
Commit: 39993a8fab
Pull-request: https://github.com/SerenityOS/serenity/pull/10737
Reviewed-by: https://github.com/BenWiederhake
Reviewed-by: https://github.com/PeterBindels-TomTom
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/dascandy
Reviewed-by: https://github.com/trflynn89
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));
|
||||
delete static_cast<const T*>(this);
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -577,10 +577,9 @@ private:
|
|||
{
|
||||
if (g_profiling_all_threads)
|
||||
return g_global_perf_events;
|
||||
else if (m_profiling)
|
||||
if (m_profiling)
|
||||
return m_perf_event_buffer.ptr();
|
||||
else
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mutable IntrusiveListNode<Process> m_list_node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue