From 3bfc1c1e945d0cf6ae1d5e38ca68b83c1918bbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 8 Apr 2023 19:28:01 +0200 Subject: [PATCH] Animation: remove a suspicious internal TrackViewStorage constructor. It was there to allow creating const views, because the other one had conflicting deduction for the V template parameter. The proper fix is to use std::remove_const::type instead. --- src/Magnum/Animation/Track.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Magnum/Animation/Track.h b/src/Magnum/Animation/Track.h index cc64d47bb..eda078250 100644 --- a/src/Magnum/Animation/Track.h +++ b/src/Magnum/Animation/Track.h @@ -519,9 +519,7 @@ template class TrackViewStorage { private: template friend class TrackView; - template explicit TrackViewStorage(const Containers::StridedArrayView1D& keys, const Containers::StridedArrayView1D& values, Interpolation interpolation, R(*interpolator)(const V&, const V&, Float), Extrapolation before, Extrapolation after) noexcept: _keys{keys}, _values{reinterpret_cast&>(values)}, _interpolator{reinterpret_cast(interpolator)}, _interpolation{interpolation}, _before{before}, _after{after} {} - - template explicit TrackViewStorage(const Containers::StridedArrayView1D& keys, const Containers::StridedArrayView1D& values, Interpolation interpolation, R(*interpolator)(const V&, const V&, Float), Extrapolation before, Extrapolation after) noexcept: _keys{keys}, _values{reinterpret_cast&>(values)}, _interpolator{reinterpret_cast(interpolator)}, _interpolation{interpolation}, _before{before}, _after{after} {} + template explicit TrackViewStorage(const Containers::StridedArrayView1D& keys, const Containers::StridedArrayView1D& values, Interpolation interpolation, R(*interpolator)(const typename std::remove_const::type&, const typename std::remove_const::type&, Float), Extrapolation before, Extrapolation after) noexcept: _keys{keys}, _values{reinterpret_cast&>(values)}, _interpolator{reinterpret_cast(interpolator)}, _interpolation{interpolation}, _before{before}, _after{after} {} Containers::StridedArrayView1D _keys; Containers::StridedArrayView1D::value, const char, char>::type> _values;