Instance: embed EventLoop, no pointer

This commit is contained in:
Max Kellermann
2016-03-05 20:17:47 +01:00
parent ce09379bae
commit b4d594eeff
3 changed files with 15 additions and 21 deletions

View File

@@ -21,6 +21,7 @@
#define MPD_INSTANCE_HXX
#include "check.h"
#include "event/Loop.hxx"
#include "Compiler.h"
#ifdef ENABLE_NEIGHBOR_PLUGINS
@@ -54,7 +55,7 @@ struct Instance final
public NeighborListener
#endif
{
EventLoop *event_loop;
EventLoop event_loop;
#ifdef ENABLE_NEIGHBOR_PLUGINS
NeighborGlue *neighbors;
@@ -79,7 +80,9 @@ struct Instance final
/**
* Initiate shutdown. Wrapper for EventLoop::Break().
*/
void Shutdown();
void Shutdown() {
event_loop.Break();
}
#ifdef ENABLE_DATABASE
/**