mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Kernel: Make TimerId a distinct type
Well, that was easy\! :^)
This commit is contained in:
parent
94e0a603f2
commit
65b36e42b8
Notes:
sideshowbarker
2024-07-18 21:47:53 +09:00
Author: https://github.com/BenWiederhake
Commit: 65b36e42b8
Pull-request: https://github.com/SerenityOS/serenity/pull/5323
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bgianfo
2 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ TimerId TimerQueue::add_timer(NonnullRefPtr<Timer>&& timer)
|
|||
timer->m_id = ++m_timer_id_count;
|
||||
VERIFY(timer->m_id != 0); // wrapped
|
||||
add_timer_locked(move(timer));
|
||||
return m_timer_id_count;
|
||||
return timer->m_id;
|
||||
}
|
||||
|
||||
void TimerQueue::add_timer_locked(NonnullRefPtr<Timer> timer)
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
typedef u64 TimerId;
|
||||
TYPEDEF_DISTINCT_ORDERED_ID(u64, TimerId);
|
||||
|
||||
class Timer : public RefCounted<Timer>
|
||||
, public InlineLinkedListNode<Timer> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue