summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-07-01 18:30:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-07-01 18:30:37 +0200
commit33e902a74465110489c6566f5f0c035ad9432de4 (patch)
treeb2bb4a6d9351100bd2622d221ca1eeda36be9ec7
parent15c97dd8ddeba8d0f0e80df39320e3789f3fb4b2 (diff)
compat: drop pre-C++20 macros.hpp header
-rw-r--r--compat/check-visible.cpp2
-rw-r--r--compat/check-visible.hpp2
-rw-r--r--compat/correlation-calibrator.cpp2
-rw-r--r--compat/macros.h (renamed from compat/macros1.h)0
-rw-r--r--compat/macros.hpp17
-rw-r--r--compat/shm.h4
-rw-r--r--cv/translation-calibrator.cpp2
-rw-r--r--cv/video-widget.cpp2
-rw-r--r--dinput/dinput.cpp2
-rw-r--r--dinput/keybinding-worker.cpp2
-rw-r--r--dinput/win32-joystick.cpp2
-rw-r--r--filter-accela/ftnoir_filter_accela.h1
-rw-r--r--logic/pipeline.cpp2
-rw-r--r--opentrack/main-window.cpp2
-rw-r--r--options/base-value.hpp1
-rw-r--r--options/globals.hpp2
-rw-r--r--options/group.hpp2
-rw-r--r--options/metatype.cpp1
-rw-r--r--options/slider.hpp1
-rw-r--r--options/value.hpp1
-rw-r--r--proto-iokit-foohid/foohidjoystick.cpp2
-rw-r--r--proto-iokit-foohid/iokitprotocol.cpp2
-rw-r--r--proto-libevdev/ftnoir_protocol_libevdev.h1
-rw-r--r--proto-vjoystick/vjoystick.h1
-rw-r--r--qxt-mini/powerset.hpp2
-rw-r--r--spline/spline-widget.cpp1
-rw-r--r--spline/spline.cpp6
-rw-r--r--tracker-easy/preview.cpp2
-rw-r--r--tracker-kinect-face/kinect_face_settings.h1
-rw-r--r--tracker-kinect-face/kinect_face_tracker.h1
-rw-r--r--tracker-test/test.h1
-rw-r--r--tracker-trackhat/trackhat.hpp1
-rw-r--r--video-ps3eye/module.hpp2
33 files changed, 20 insertions, 53 deletions
diff --git a/compat/check-visible.cpp b/compat/check-visible.cpp
index 4da649c7..621d941a 100644
--- a/compat/check-visible.cpp
+++ b/compat/check-visible.cpp
@@ -10,7 +10,7 @@ static bool visible = true;
#if defined _WIN32
#include "timer.hpp"
-#include "macros.hpp"
+#include "macros.h"
static Timer timer;
diff --git a/compat/check-visible.hpp b/compat/check-visible.hpp
index e24260ab..6669b84d 100644
--- a/compat/check-visible.hpp
+++ b/compat/check-visible.hpp
@@ -1,7 +1,7 @@
#pragma once
#include "export.hpp"
-#include "macros1.h"
+#include "macros.h"
class QWidget;
diff --git a/compat/correlation-calibrator.cpp b/compat/correlation-calibrator.cpp
index 4f08ecd5..07ef7d3d 100644
--- a/compat/correlation-calibrator.cpp
+++ b/compat/correlation-calibrator.cpp
@@ -2,7 +2,7 @@
#include "variance.hpp"
#include "compat/math.hpp"
#include "compat/meta.hpp"
-#include "compat/macros1.h"
+#include "compat/macros.h"
#include <cmath>
#include <iterator>
diff --git a/compat/macros1.h b/compat/macros.h
index 5325d055..5325d055 100644
--- a/compat/macros1.h
+++ b/compat/macros.h
diff --git a/compat/macros.hpp b/compat/macros.hpp
deleted file mode 100644
index b6eea12b..00000000
--- a/compat/macros.hpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-
-#include "macros1.h"
-
-#include <utility>
-#include <type_traits>
-
-// before C++20
-namespace cxx20_compat {
- template<typename T>
- struct remove_cvref {
- using type = std::remove_cv_t<std::remove_reference_t<T>>;
- };
-} // ns cxx20_compat
-
-template<typename t>
-using remove_cvref_t = typename cxx20_compat::remove_cvref<t>::type;
diff --git a/compat/shm.h b/compat/shm.h
index d1363219..5036b335 100644
--- a/compat/shm.h
+++ b/compat/shm.h
@@ -20,7 +20,7 @@
#endif
#include "export.hpp"
-#include "macros1.h"
+#include "macros.h"
class OTR_COMPAT_EXPORT shm_wrapper final
{
@@ -39,4 +39,6 @@ public:
bool unlock();
bool success();
inline void* ptr() { return mem; }
+
+ OTR_DISABLE_MOVE_COPY(shm_wrapper);
};
diff --git a/cv/translation-calibrator.cpp b/cv/translation-calibrator.cpp
index 8fe9a1b8..6fb3e638 100644
--- a/cv/translation-calibrator.cpp
+++ b/cv/translation-calibrator.cpp
@@ -8,7 +8,7 @@
#include "translation-calibrator.hpp"
#include "compat/euler.hpp"
#include "compat/math.hpp"
-#include "compat/macros1.h"
+#include "compat/macros.h"
#include <opencv2/core.hpp>
#include <tuple>
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp
index 6d8c0be3..7accd275 100644
--- a/cv/video-widget.cpp
+++ b/cv/video-widget.cpp
@@ -1,5 +1,5 @@
#include "video-widget.hpp"
-#include "compat/macros1.h"
+#include "compat/macros.h"
#include <opencv2/imgproc.hpp>
void cv_video_widget::update_image(const cv::Mat& frame)
diff --git a/dinput/dinput.cpp b/dinput/dinput.cpp
index 7a0e9cab..b9713b8a 100644
--- a/dinput/dinput.cpp
+++ b/dinput/dinput.cpp
@@ -1,7 +1,7 @@
#undef NDEBUG
#include "dinput.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include <cassert>
#include <cstdlib>
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp
index 02036352..7cd8d663 100644
--- a/dinput/keybinding-worker.cpp
+++ b/dinput/keybinding-worker.cpp
@@ -9,7 +9,7 @@
#ifdef _WIN32
#include "keybinding-worker.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include "compat/thread-name.hpp"
#include <QDebug>
diff --git a/dinput/win32-joystick.cpp b/dinput/win32-joystick.cpp
index 90350651..cb7a3837 100644
--- a/dinput/win32-joystick.cpp
+++ b/dinput/win32-joystick.cpp
@@ -1,7 +1,7 @@
#ifdef _WIN32
#include "win32-joystick.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include <cstddef>
#include <algorithm>
diff --git a/filter-accela/ftnoir_filter_accela.h b/filter-accela/ftnoir_filter_accela.h
index ddd3bc03..0d6dca1b 100644
--- a/filter-accela/ftnoir_filter_accela.h
+++ b/filter-accela/ftnoir_filter_accela.h
@@ -12,7 +12,6 @@
#include "api/plugin-api.hpp"
#include "compat/timer.hpp"
#include "compat/variance.hpp"
-#include "compat/macros.hpp"
#include <QMutex>
#include <QTimer>
diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp
index 4bb11424..2f88c8b1 100644
--- a/logic/pipeline.cpp
+++ b/logic/pipeline.cpp
@@ -15,7 +15,7 @@
#include "compat/sleep.hpp"
#include "compat/math.hpp"
#include "compat/meta.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include "compat/thread-name.hpp"
#include "pipeline.hpp"
diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp
index fadcf1e5..c021eaec 100644
--- a/opentrack/main-window.cpp
+++ b/opentrack/main-window.cpp
@@ -13,7 +13,7 @@
#include "migration/migration.hpp"
#include "compat/check-visible.hpp"
#include "compat/sleep.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include "compat/library-path.hpp"
#include "compat/math.hpp"
#include "compat/sysexits.hpp"
diff --git a/options/base-value.hpp b/options/base-value.hpp
index 81da0513..7b65d524 100644
--- a/options/base-value.hpp
+++ b/options/base-value.hpp
@@ -6,7 +6,6 @@
#include "metatype.hpp"
#include "export.hpp"
-#include "compat/macros.hpp"
#include "value-traits.hpp"
#include <utility>
diff --git a/options/globals.hpp b/options/globals.hpp
index 7af6533d..af242dc9 100644
--- a/options/globals.hpp
+++ b/options/globals.hpp
@@ -1,7 +1,7 @@
#pragma once
#include "export.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include <optional>
diff --git a/options/group.hpp b/options/group.hpp
index 93299b6e..11bab965 100644
--- a/options/group.hpp
+++ b/options/group.hpp
@@ -4,7 +4,7 @@
#include "compat/base-path.hpp"
#include "compat/library-path.hpp"
-#include "compat/macros.hpp"
+#include "compat/macros.h"
#include "compat/qhash.hpp"
#include "export.hpp"
diff --git a/options/metatype.cpp b/options/metatype.cpp
index 7962b81b..7430c00a 100644
--- a/options/metatype.cpp
+++ b/options/metatype.cpp
@@ -1,5 +1,4 @@
#include <QMetaType>
-#include "compat/macros.hpp"
namespace options::detail {
diff --git a/options/slider.hpp b/options/slider.hpp
index 5d21bf0f..1e721ae0 100644
--- a/options/slider.hpp
+++ b/options/slider.hpp
@@ -8,7 +8,6 @@
#pragma once
#include "export.hpp"
-#include "compat/macros.hpp"
#include <type_traits>
diff --git a/options/value.hpp b/options/value.hpp
index 4476f8b7..c752d497 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -14,7 +14,6 @@
#include "slider.hpp"
#include "base-value.hpp"
#include "value-traits.hpp"
-#include "compat/macros.hpp"
#include <type_traits>
#include <utility>
diff --git a/proto-iokit-foohid/foohidjoystick.cpp b/proto-iokit-foohid/foohidjoystick.cpp
index 898db2f4..b4964bb7 100644
--- a/proto-iokit-foohid/foohidjoystick.cpp
+++ b/proto-iokit-foohid/foohidjoystick.cpp
@@ -7,8 +7,6 @@
#include "foohidjoystick.h"
-#include "compat/macros.hpp"
-
const char FOOHID_SERVICE_NAME[] = "it_unbit_foohid";
enum class FooHIDMethod {
diff --git a/proto-iokit-foohid/iokitprotocol.cpp b/proto-iokit-foohid/iokitprotocol.cpp
index 77a1e005..a364fd8a 100644
--- a/proto-iokit-foohid/iokitprotocol.cpp
+++ b/proto-iokit-foohid/iokitprotocol.cpp
@@ -10,8 +10,6 @@
#include "foohidjoystick.h"
#include "iokitprotocoldialog.h"
-#include "compat/macros.hpp"
-
#include <QDebug>
IOKitProtocol::IOKitProtocol()
diff --git a/proto-libevdev/ftnoir_protocol_libevdev.h b/proto-libevdev/ftnoir_protocol_libevdev.h
index 0b0f2612..b81c3baf 100644
--- a/proto-libevdev/ftnoir_protocol_libevdev.h
+++ b/proto-libevdev/ftnoir_protocol_libevdev.h
@@ -7,7 +7,6 @@
#pragma once
#include "ui_ftnoir_libevdev_controls.h"
-#include "compat/macros.hpp"
#include "api/plugin-api.hpp"
#include <libevdev/libevdev.h>
#include <libevdev/libevdev-uinput.h>
diff --git a/proto-vjoystick/vjoystick.h b/proto-vjoystick/vjoystick.h
index 39bc14e3..82ebd3e6 100644
--- a/proto-vjoystick/vjoystick.h
+++ b/proto-vjoystick/vjoystick.h
@@ -8,7 +8,6 @@
#pragma once
#include "ui_vjoystick.h"
#include "api/plugin-api.hpp"
-#include "compat/macros.hpp"
enum status
{
diff --git a/qxt-mini/powerset.hpp b/qxt-mini/powerset.hpp
index d8a8ec9b..901ff0c7 100644
--- a/qxt-mini/powerset.hpp
+++ b/qxt-mini/powerset.hpp
@@ -1,7 +1,5 @@
#pragma once
-#include "compat/macros.hpp"
-
#include <type_traits>
#include <cinttypes>
#include <vector>
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp
index d26fb13f..46e2095c 100644
--- a/spline/spline-widget.cpp
+++ b/spline/spline-widget.cpp
@@ -1,6 +1,5 @@
#include "spline-widget.hpp"
#include "compat/math.hpp"
-#include "compat/macros.hpp"
#include <algorithm>
diff --git a/spline/spline.cpp b/spline/spline.cpp
index b8f84df5..aae7dd2e 100644
--- a/spline/spline.cpp
+++ b/spline/spline.cpp
@@ -390,9 +390,9 @@ void spline::set_bundle(bundle b, const QString& axis_name, Axis axis)
invalidate_settings_();
S = s;
- conn_points = s->points.connect_to(&*ctx, &spline::invalidate_settings(), Qt::DirectConnection);
- conn_maxx = s->opts.clamp_x_.connect_to(&*ctx, &spline::invalidate_settings, Qt::DirectConnection);
- conn_maxy = s->opts.clamp_y_.connect_to(&*ctx, &spline::invalidate_settings(), Qt::DirectConnection);
+ conn_points = s->points.connect_to(&*ctx, [this] { invalidate_settings(); }, Qt::DirectConnection);
+ conn_maxx = s->opts.clamp_x_.connect_to(&*ctx, [this] { invalidate_settings(); }, Qt::DirectConnection);
+ conn_maxy = s->opts.clamp_y_.connect_to(&*ctx, [this] { invalidate_settings(); }, Qt::DirectConnection);
}
emit S->recomputed();
diff --git a/tracker-easy/preview.cpp b/tracker-easy/preview.cpp
index f8025a64..97c8aeaf 100644
--- a/tracker-easy/preview.cpp
+++ b/tracker-easy/preview.cpp
@@ -9,7 +9,7 @@
#include "preview.h"
#include "compat/math.hpp"
-#include "compat/macros1.h"
+#include "compat/macros.h"
#include <opencv2/imgproc.hpp>
#include <QDebug>
diff --git a/tracker-kinect-face/kinect_face_settings.h b/tracker-kinect-face/kinect_face_settings.h
index 40af1eb7..2c5cc55f 100644
--- a/tracker-kinect-face/kinect_face_settings.h
+++ b/tracker-kinect-face/kinect_face_settings.h
@@ -8,7 +8,6 @@
#pragma once
#include "ui_kinect_face_settings.h"
-#include "compat/macros.hpp"
#include "api/plugin-api.hpp"
class KinectFaceSettings : public ITrackerDialog
diff --git a/tracker-kinect-face/kinect_face_tracker.h b/tracker-kinect-face/kinect_face_tracker.h
index 8070c519..83b58d71 100644
--- a/tracker-kinect-face/kinect_face_tracker.h
+++ b/tracker-kinect-face/kinect_face_tracker.h
@@ -12,7 +12,6 @@
#include "api/plugin-api.hpp"
#include "compat/timer.hpp"
-#include "compat/macros.hpp"
#include "video/video-widget.hpp"
// Kinect Header files
diff --git a/tracker-test/test.h b/tracker-test/test.h
index 7f06968e..320145ad 100644
--- a/tracker-test/test.h
+++ b/tracker-test/test.h
@@ -2,7 +2,6 @@
#include "ui_test.h"
#include "api/plugin-api.hpp"
#include "compat/timer.hpp"
-#include "compat/macros.hpp"
#include <cmath>
diff --git a/tracker-trackhat/trackhat.hpp b/tracker-trackhat/trackhat.hpp
index 04da69cb..ea00b15e 100644
--- a/tracker-trackhat/trackhat.hpp
+++ b/tracker-trackhat/trackhat.hpp
@@ -1,7 +1,6 @@
#pragma once
#include "../tracker-pt/pt-api.hpp"
-#include "compat/macros.hpp"
#include "compat/timer.hpp"
#include "options/options.hpp"
diff --git a/video-ps3eye/module.hpp b/video-ps3eye/module.hpp
index 26cfad60..f6934d70 100644
--- a/video-ps3eye/module.hpp
+++ b/video-ps3eye/module.hpp
@@ -4,7 +4,7 @@
#include "shm-layout.hpp"
#include "compat/shm.h"
#include "options/options.hpp"
-#include "compat/macros1.h"
+#include "compat/macros.h"
#include "compat/timer.hpp"
#include "ui_dialog.h"