Commit 4a283330 authored by Max Kellermann's avatar Max Kellermann

event/Loop: remove the dummy constructor argument

parent ad7f2b2a
...@@ -411,7 +411,7 @@ int mpd_main(int argc, char *argv[]) ...@@ -411,7 +411,7 @@ int mpd_main(int argc, char *argv[])
} }
main_thread = ThreadId::GetCurrent(); main_thread = ThreadId::GetCurrent();
main_loop = new EventLoop(EventLoop::Default()); main_loop = new EventLoop();
instance = new Instance(); instance = new Instance();
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <algorithm> #include <algorithm>
EventLoop::EventLoop(Default) EventLoop::EventLoop()
:SocketMonitor(*this), :SocketMonitor(*this),
now_ms(::MonotonicClockMS()), now_ms(::MonotonicClockMS()),
quit(false), busy(true), quit(false), busy(true),
......
...@@ -115,9 +115,7 @@ class EventLoop final : SocketMonitor ...@@ -115,9 +115,7 @@ class EventLoop final : SocketMonitor
ThreadId thread; ThreadId thread;
public: public:
struct Default {}; EventLoop();
EventLoop(Default dummy=Default());
~EventLoop(); ~EventLoop();
/** /**
......
...@@ -115,7 +115,7 @@ int main(int argc, gcc_unused char **argv) ...@@ -115,7 +115,7 @@ int main(int argc, gcc_unused char **argv)
g_thread_init(NULL); g_thread_init(NULL);
#endif #endif
main_loop = new EventLoop(EventLoop::Default()); main_loop = new EventLoop;
Error error; Error error;
Mixer *mixer = mixer_new(&alsa_mixer_plugin, nullptr, Mixer *mixer = mixer_new(&alsa_mixer_plugin, nullptr,
......
...@@ -29,7 +29,7 @@ unsigned listen_port = 1234; ...@@ -29,7 +29,7 @@ unsigned listen_port = 1234;
int int
main(gcc_unused int argc, gcc_unused char **argv) main(gcc_unused int argc, gcc_unused char **argv)
{ {
EventLoop event_loop((EventLoop::Default())); EventLoop event_loop;
const ShutdownHandler shutdown_handler(event_loop); const ShutdownHandler shutdown_handler(event_loop);
AvahiInit(event_loop, "test"); AvahiInit(event_loop, "test");
......
...@@ -51,7 +51,7 @@ int main(int argc, char **argv) ...@@ -51,7 +51,7 @@ int main(int argc, char **argv)
path = argv[1]; path = argv[1];
EventLoop event_loop((EventLoop::Default())); EventLoop event_loop;
const ShutdownHandler shutdown_handler(event_loop); const ShutdownHandler shutdown_handler(event_loop);
Error error; Error error;
......
...@@ -66,7 +66,7 @@ main(int argc, char **argv) ...@@ -66,7 +66,7 @@ main(int argc, char **argv)
/* initialize the core */ /* initialize the core */
EventLoop loop((EventLoop::Default())); EventLoop loop;
/* initialize neighbor plugins */ /* initialize neighbor plugins */
......
...@@ -189,7 +189,7 @@ int main(int argc, char **argv) ...@@ -189,7 +189,7 @@ int main(int argc, char **argv)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
main_loop = new EventLoop(EventLoop::Default()); main_loop = new EventLoop();
io_thread_init(); io_thread_init();
io_thread_start(); io_thread_start();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment