Skip to content

Commit b2bf950

Browse files
committed
event/Thread: use inline initializers
1 parent 7df0413 commit b2bf950

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/event/Thread.hxx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@
1111
* A thread which runs an #EventLoop.
1212
*/
1313
class EventThread final {
14-
EventLoop event_loop;
14+
EventLoop event_loop{ThreadId::Null()};
1515

16-
Thread thread;
16+
Thread thread{BIND_THIS_METHOD(Run)};
1717

1818
const bool realtime;
1919

2020
public:
2121
explicit EventThread(bool _realtime=false)
22-
:event_loop(ThreadId::Null()), thread(BIND_THIS_METHOD(Run)),
23-
realtime(_realtime) {}
22+
:realtime(_realtime) {}
2423

2524
~EventThread() noexcept {
2625
Stop();

0 commit comments

Comments
 (0)