mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:14:58 +00:00
CEventLoop: Use NonnullOwnPtr for QueuedEvent::event.
We don't allow null events in the event queue. :^)
This commit is contained in:
parent
28da5b002f
commit
3c5befde36
2 changed files with 3 additions and 3 deletions
|
@ -148,7 +148,7 @@ void CEventLoop::pump(WaitMode mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEventLoop::post_event(CObject& receiver, OwnPtr<CEvent>&& event)
|
void CEventLoop::post_event(CObject& receiver, NonnullOwnPtr<CEvent>&& event)
|
||||||
{
|
{
|
||||||
LOCKER(m_lock);
|
LOCKER(m_lock);
|
||||||
#ifdef CEVENTLOOP_DEBUG
|
#ifdef CEVENTLOOP_DEBUG
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
// this should really only be used for integrating with other event loops
|
// this should really only be used for integrating with other event loops
|
||||||
void pump(WaitMode = WaitMode::WaitForEvents);
|
void pump(WaitMode = WaitMode::WaitForEvents);
|
||||||
|
|
||||||
void post_event(CObject& receiver, OwnPtr<CEvent>&&);
|
void post_event(CObject& receiver, NonnullOwnPtr<CEvent>&&);
|
||||||
|
|
||||||
static CEventLoop& main();
|
static CEventLoop& main();
|
||||||
static CEventLoop& current();
|
static CEventLoop& current();
|
||||||
|
@ -58,7 +58,7 @@ private:
|
||||||
|
|
||||||
struct QueuedEvent {
|
struct QueuedEvent {
|
||||||
WeakPtr<CObject> receiver;
|
WeakPtr<CObject> receiver;
|
||||||
OwnPtr<CEvent> event;
|
NonnullOwnPtr<CEvent> event;
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector<QueuedEvent, 64> m_queued_events;
|
Vector<QueuedEvent, 64> m_queued_events;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue