From 7d101a1c2827b5e7a373fb0d0a68099fb692e55a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Jan 2018 17:14:02 +0100 Subject: many: spring cleanup --- pose-widget/export.hpp | 11 +++++++++++ pose-widget/pose-widget.cpp | 10 ++++++---- pose-widget/pose-widget.hpp | 13 ++++--------- 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 pose-widget/export.hpp (limited to 'pose-widget') diff --git a/pose-widget/export.hpp b/pose-widget/export.hpp new file mode 100644 index 00000000..bfe55138 --- /dev/null +++ b/pose-widget/export.hpp @@ -0,0 +1,11 @@ +// generates export.hpp for each module from compat/linkage.hpp + +#pragma once + +#include "compat/linkage-macros.hpp" + +#ifdef BUILD_POSE_WIDGET +# define OTR_POSE_WIDGET_EXPORT OTR_GENERIC_EXPORT +#else +# define OTR_POSE_WIDGET_EXPORT OTR_GENERIC_IMPORT +#endif diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp index 50606c00..c25ad3eb 100644 --- a/pose-widget/pose-widget.cpp +++ b/pose-widget/pose-widget.cpp @@ -12,13 +12,15 @@ #include "compat/check-visible.hpp" #include #include + #include #include -#include -#include #include +// XXX this needs rewriting in terms of scanline rendering -sh 20180105 +// see: + using namespace pose_widget_impl; pose_transform::pose_transform(QWidget* dst) : @@ -279,8 +281,8 @@ void pose_transform::project_quad_texture() const unsigned orig_pitch = tex.bytesPerLine(); const unsigned dest_pitch = image.bytesPerLine(); - unsigned char const* const restrict_ptr orig = tex.constBits(); - unsigned char* const restrict_ptr dest = image.bits(); + unsigned char const* restrict_ptr orig = tex.constBits(); + unsigned char* restrict_ptr dest = image.bits(); const int orig_depth = tex.depth() / 8; const int dest_depth = image.depth() / 8; diff --git a/pose-widget/pose-widget.hpp b/pose-widget/pose-widget.hpp index cdbcdeb8..9b280afc 100644 --- a/pose-widget/pose-widget.hpp +++ b/pose-widget/pose-widget.hpp @@ -10,21 +10,16 @@ #include "api/plugin-api.hpp" #include "compat/euler.hpp" +#include "export.hpp" + #include #include #include #include -#include #include #include -#include - -#ifdef BUILD_POSE_WIDGET -# define POSE_WIDGET_EXPORT Q_DECL_EXPORT -#else -# define POSE_WIDGET_EXPORT Q_DECL_IMPORT -#endif +#include namespace pose_widget_impl { @@ -94,7 +89,7 @@ struct pose_transform final : QThread static constexpr int w = 320, h = 240; }; -class POSE_WIDGET_EXPORT pose_widget final : public QWidget +class OTR_POSE_WIDGET_EXPORT pose_widget final : public QWidget { public: pose_widget(QWidget *parent = nullptr); -- cgit v1.2.3