diff options
author | Daniel Kraft <d@domob.eu> | 2020-09-01 09:40:13 +0200 |
---|---|---|
committer | Daniel Kraft <d@domob.eu> | 2020-09-07 10:55:06 +0200 |
commit | e15b1cfc310df739b92bd281112dbeb31d3bb30a (patch) | |
tree | 5452fc4cf3f80b0463c395fb8099e957deaa555c /src/zmq/zmqnotificationinterface.h | |
parent | 78cb45d72251e85db07e8500bbdd2e9460b132b2 (diff) |
Various cleanups in zmqnotificationinterface.
This is a pure refactoring of zmqnotificationinterface to make the
code easier to read and maintain. It replaces explicit iterators
with C++11 for-each loops where appropriate and uses std::unique_ptr
to make memory ownership more explicit.
Diffstat (limited to 'src/zmq/zmqnotificationinterface.h')
-rw-r--r-- | src/zmq/zmqnotificationinterface.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h index 60f3b6148a..0686960ed4 100644 --- a/src/zmq/zmqnotificationinterface.h +++ b/src/zmq/zmqnotificationinterface.h @@ -7,6 +7,7 @@ #include <validationinterface.h> #include <list> +#include <memory> class CBlockIndex; class CZMQAbstractNotifier; @@ -34,7 +35,7 @@ private: CZMQNotificationInterface(); void *pcontext; - std::list<CZMQAbstractNotifier*> notifiers; + std::list<std::unique_ptr<CZMQAbstractNotifier>> notifiers; }; extern CZMQNotificationInterface* g_zmq_notification_interface; |