summaryrefslogtreecommitdiffhomepage
path: root/spline/spline.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-29 09:03:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-10-29 08:25:58 +0000
commit57f4c28c8e293f9ba7275786fe502dd966e344b9 (patch)
treeb9b70f3b7bf19930740fcbc567172e7c6cffeb99 /spline/spline.hpp
parent698733a531c3d85056e74d4a3f3ae1f671bd229d (diff)
spline: try fix rare infinite loop
- fix floats not equal to themselves infinite loop; check if any elements were removed instead - do sort in-place to avoid potentially sorting twice in `update_interp_data' - simplify lerp loop - define magic value
Diffstat (limited to 'spline/spline.hpp')
-rw-r--r--spline/spline.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/spline/spline.hpp b/spline/spline.hpp
index 7b9b6aa3..ccc22518 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 bool sort_fn(const QPointF& one, const QPointF& two);
+ static cc_forceinline bool sort_fn(const QPointF& one, const QPointF& two);
static QPointF ensure_in_bounds(const QList<QPointF>& points, int i);
static int element_count(const QList<QPointF>& points, double max_input);
@@ -153,7 +153,7 @@ public:
void set_tracking_active(bool value) override;
bundle get_bundle();
- void ensure_valid(points_t& points_);
+ void ensure_valid(points_t& in_out);
std::shared_ptr<spline_detail::base_settings> get_settings() override;
std::shared_ptr<const spline_detail::base_settings> get_settings() const override;