From 29bea6f9b2166bf3e50815d84aff3535705f6b9b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 3 Nov 2018 07:16:21 +0100 Subject: fix build on Linux --- cmake/opentrack-boilerplate.cmake | 4 ++++ gui/mapping-dialog.cpp | 2 -- qxt-mini/powerset.hpp | 3 +-- spline/spline.cpp | 2 +- spline/spline.hpp | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 685dbdb3..84bd3a03 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -68,6 +68,10 @@ function(otr_compat target) set_property(SOURCE ${${target}-moc} APPEND_STRING PROPERTY COMPILE_FLAGS "-w -Wno-error ") endif() + if(UNIX) # no-op on OSX + target_link_libraries(${target} m) + endif() + get_property(type TARGET "${n}" PROPERTY TYPE) if (".${TYPE}" STREQUAL ".EXECUTABLE") otr_fixup_subsystem(${target}) diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index 021489dc..e57cead2 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -127,8 +127,6 @@ void mapping_dialog::load() qfc.force_redraw(); } - const int idx = qfcs[i].axis; - using c = axis_opts::max_clamp; auto update_xstep = [&qfc](int clamp_x) { diff --git a/qxt-mini/powerset.hpp b/qxt-mini/powerset.hpp index 7847548e..d8a8ec9b 100644 --- a/qxt-mini/powerset.hpp +++ b/qxt-mini/powerset.hpp @@ -66,8 +66,7 @@ private: }; template -auto -cc_forceinline make_powerset(const t& arg, const xs&... args) +inline auto make_powerset(const t& arg, const xs&... args) { using cnt = std::integral_constant; using p = powerset; diff --git a/spline/spline.cpp b/spline/spline.cpp index 1a0f7257..450643ea 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -377,7 +377,7 @@ void spline::ensure_valid(points_t& list) QList all_points, tmp; all_points.reserve(sz), tmp.reserve(sz); - const double maxx = max_input(), maxy = max_output(); + const double maxx = max_input(); for (int i = 0; i < sz; i++) { diff --git a/spline/spline.hpp b/spline/spline.hpp index ccc22518..3d2d6e57 100644 --- a/spline/spline.hpp +++ b/spline/spline.hpp @@ -99,7 +99,7 @@ class OTR_SPLINE_EXPORT spline : public base_spline float get_value_internal(int x); void add_lone_point(); float get_value_no_save_internal(double x); - static cc_forceinline bool sort_fn(const QPointF& one, const QPointF& two); + static bool sort_fn(const QPointF& one, const QPointF& two); static QPointF ensure_in_bounds(const QList& points, int i); static int element_count(const QList& points, double max_input); -- cgit v1.2.3