Use magic statics instead of ATOMIC_STATIC. (#109)

This commit is contained in:
Peter Johnson
2017-11-17 09:29:20 -08:00
committed by GitHub
parent 20c8d29ae9
commit 3324bcc5ce
10 changed files with 6 additions and 42 deletions

View File

@@ -11,7 +11,6 @@
#include <functional>
#include <support/SafeThread.h>
#include <support/atomic_static.h>
#include "cscore_cpp.h"
@@ -25,7 +24,7 @@ class Notifier {
public:
static Notifier& GetInstance() {
ATOMIC_STATIC(Notifier, instance);
static Notifier instance;
return instance;
}
~Notifier();
@@ -64,8 +63,6 @@ class Notifier {
std::function<void()> m_on_start;
std::function<void()> m_on_exit;
ATOMIC_STATIC_DECL(Notifier)
static bool s_destroyed;
};