summaryrefslogtreecommitdiffhomepage
path: root/proto-ft/ftnoir_protocol_ft.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-05-22 12:49:41 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-05-22 12:49:41 +0200
commitc6819cfa0213a72be66c7e6c9808fd1b7ad9ce03 (patch)
tree16cece5699eebeeda67f58f825a8418824c17104 /proto-ft/ftnoir_protocol_ft.cpp
parent78d34c3285bbdc8ba30bf07d06235f68f73346fb (diff)
proto/freetrack: runonce check can be a static member
Now that we have -fuse-cxa-atexit static dtors for modules are called as they should be.
Diffstat (limited to 'proto-ft/ftnoir_protocol_ft.cpp')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 42671b8f..9dba2bff 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -9,6 +9,8 @@
#include "ftnoir_protocol_ft.h"
#include "csv/csv.h"
+check_for_first_run FTNoIR_Protocol::runonce_check = check_for_first_run();
+
FTNoIR_Protocol::FTNoIR_Protocol() :
shm(FREETRACK_HEAP, FREETRACK_MUTEX, sizeof(FTHeap)),
pMemData((FTHeap*) shm.ptr()),
@@ -16,11 +18,11 @@ FTNoIR_Protocol::FTNoIR_Protocol() :
viewsStop(nullptr),
intGameID(0)
{
- runonce_check->set_enabled(s.close_protocols_on_exit);
+ runonce_check.set_enabled(s.close_protocols_on_exit);
QObject::connect(&s.close_protocols_on_exit,
static_cast<void (base_value::*)(bool)>(&value<bool>::valueChanged),
- [] (bool flag) -> void { runonce_check->set_enabled(flag); });
- runonce_check->try_runonce();
+ [] (bool flag) -> void { runonce_check.set_enabled(flag); });
+ runonce_check.try_runonce();
}
FTNoIR_Protocol::~FTNoIR_Protocol()