mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
CEventLoop: Make it possible to determine running/quit state without using exec()
... by removing a redundant member that nothing uses (running), and exposing whether or not quit has been requested.
This commit is contained in:
parent
bb288c1baf
commit
8df3e2516f
2 changed files with 1 additions and 4 deletions
|
@ -87,8 +87,6 @@ private:
|
||||||
int CEventLoop::exec()
|
int CEventLoop::exec()
|
||||||
{
|
{
|
||||||
CEventLoopPusher pusher(*this);
|
CEventLoopPusher pusher(*this);
|
||||||
|
|
||||||
m_running = true;
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (m_exit_requested)
|
if (m_exit_requested)
|
||||||
return m_exit_code;
|
return m_exit_code;
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
static CEventLoop& main();
|
static CEventLoop& main();
|
||||||
static CEventLoop& current();
|
static CEventLoop& current();
|
||||||
|
|
||||||
bool running() const { return m_running; }
|
bool was_exit_requested() const { return m_exit_requested; }
|
||||||
|
|
||||||
static int register_timer(CObject&, int milliseconds, bool should_reload);
|
static int register_timer(CObject&, int milliseconds, bool should_reload);
|
||||||
static bool unregister_timer(int timer_id);
|
static bool unregister_timer(int timer_id);
|
||||||
|
@ -65,7 +65,6 @@ private:
|
||||||
|
|
||||||
Vector<QueuedEvent, 64> m_queued_events;
|
Vector<QueuedEvent, 64> m_queued_events;
|
||||||
|
|
||||||
bool m_running { false };
|
|
||||||
bool m_exit_requested { false };
|
bool m_exit_requested { false };
|
||||||
int m_exit_code { 0 };
|
int m_exit_code { 0 };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue