From e81df263f4123a39fe6d4d50fb21f47dd242e796 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 20 Dec 2018 18:23:14 +0100 Subject: remove const correctness violations This is possibly related to a livelock where several threads do const removal in their respective code paths. Use the `mutable' specifier for the mutexes and spline's cached data. Now using the `mutable' specifier, get rid of in compat/mutex. --- tracker-pt/pt-api.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tracker-pt') diff --git a/tracker-pt/pt-api.hpp b/tracker-pt/pt-api.hpp index 12085560..6c36ebaf 100644 --- a/tracker-pt/pt-api.hpp +++ b/tracker-pt/pt-api.hpp @@ -42,16 +42,13 @@ struct pt_frame : pt_pixel_pos_mixin template t* as() & { - using u = remove_cvref_t; - static_assert(std::is_convertible_v, "must be derived from pt_frame"); - return static_cast(this); } template t const* as_const() const& { - return const_cast(this)->as(); + return static_cast(this); } }; -- cgit v1.2.3