diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-20 13:38:02 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-20 13:38:02 +0200 |
commit | b864a6932fbb1f35b0d6fb8e4835307b1d5a2299 (patch) | |
tree | 3f4a19e62ac30bdf4c8cefae4a72cd567af06a24 /opentrack | |
parent | 931541b7d58f747e09c59450f666fb34985d0536 (diff) | |
parent | 0c1b4510b3f7a744cc4cad94e0d4dde45925269d (diff) |
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'opentrack')
-rw-r--r-- | opentrack/selected-libraries.cpp | 4 | ||||
-rw-r--r-- | opentrack/selected-libraries.hpp | 1 | ||||
-rw-r--r-- | opentrack/sleep.hpp | 22 | ||||
-rw-r--r-- | opentrack/work.hpp | 2 |
4 files changed, 23 insertions, 6 deletions
diff --git a/opentrack/selected-libraries.cpp b/opentrack/selected-libraries.cpp index 630b7db2..e3bac0c5 100644 --- a/opentrack/selected-libraries.cpp +++ b/opentrack/selected-libraries.cpp @@ -1,10 +1,6 @@ #include "opentrack/selected-libraries.hpp" #include <QDebug> -SelectedLibraries::~SelectedLibraries() -{ -} - SelectedLibraries::SelectedLibraries(QFrame* frame, mem<ITracker> t, dylibptr p, mem<IFilter> f) : pTracker(nullptr), pFilter(nullptr), diff --git a/opentrack/selected-libraries.hpp b/opentrack/selected-libraries.hpp index 547f5f54..7779c231 100644 --- a/opentrack/selected-libraries.hpp +++ b/opentrack/selected-libraries.hpp @@ -18,6 +18,5 @@ struct SelectedLibraries { mem<IProtocol> pProtocol; SelectedLibraries(QFrame* frame, mem<ITracker> t, dylibptr p, mem<IFilter> f); SelectedLibraries() : pTracker(nullptr), pFilter(nullptr), pProtocol(nullptr), correct(false) {} - ~SelectedLibraries(); bool correct; }; diff --git a/opentrack/sleep.hpp b/opentrack/sleep.hpp new file mode 100644 index 00000000..27920842 --- /dev/null +++ b/opentrack/sleep.hpp @@ -0,0 +1,22 @@ +#pragma once + +namespace portable +{ +#ifdef _WIN32 + #include <windows.h> + + template<typename = void> + void sleep(unsigned milliseconds) + { + Sleep(milliseconds); + } +#else + #include <unistd.h> + + template<typename = void> + void sleep(unsigned milliseconds) + { + usleep(milliseconds * 1000U); // takes microseconds + } +#endif +} diff --git a/opentrack/work.hpp b/opentrack/work.hpp index 39eb12fb..5d1f6b54 100644 --- a/opentrack/work.hpp +++ b/opentrack/work.hpp @@ -20,7 +20,7 @@ struct Work { main_settings& s; - SelectedLibraries libs; + SelectedLibraries& libs; mem<Tracker> tracker; mem<Shortcuts> sc; WId handle; |