summaryrefslogtreecommitdiffhomepage
path: root/proto-ft/ftnoir_protocol_ft.h
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.h
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.h')
-rw-r--r--proto-ft/ftnoir_protocol_ft.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.h b/proto-ft/ftnoir_protocol_ft.h
index 061504d9..467fc9cc 100644
--- a/proto-ft/ftnoir_protocol_ft.h
+++ b/proto-ft/ftnoir_protocol_ft.h
@@ -22,6 +22,7 @@
#include "opentrack-compat/options.hpp"
#include "freetrackclient/fttypes.h"
#include <memory>
+#include "mutex.hpp"
using namespace options;
@@ -39,15 +40,6 @@ struct settings : opts {
typedef void (__stdcall *importTIRViewsStart)(void);
typedef void (__stdcall *importTIRViewsStop)(void);
-// for runonce, see mutex.cpp
-struct runonce
-{
- virtual void try_runonce() = 0;
- virtual bool is_first_run() = 0;
- virtual ~runonce() {}
- virtual void set_enabled(bool flag) = 0;
-};
-
class FTNoIR_Protocol : public IProtocol
{
public:
@@ -72,8 +64,7 @@ private:
int intGameID;
QString connected_game;
QMutex game_name_mutex;
-
- static std::unique_ptr<runonce> runonce_check;
+ static check_for_first_run runonce_check;
static inline double getRadsFromDegrees(double degrees) { return degrees * 0.017453; }
void start_tirviews();