From bdc41373d9fd09c501d19c5f4be930bd853dc6c0 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Wed, 13 Jan 2021 10:46:46 +0100 Subject: [PATCH] [MaL] Curves; Generalize ctor to accept non-rvalue --- MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp | 2 +- MathLib/Curve/PiecewiseLinearMonotonicCurve.h | 4 ++-- .../InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp | 4 ++-- .../InterpolationAlgorithms/PiecewiseLinearInterpolation.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp index 8392d93ecab..42cd1d4bafa 100644 --- a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp +++ b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp @@ -21,7 +21,7 @@ namespace MathLib { PiecewiseLinearMonotonicCurve::PiecewiseLinearMonotonicCurve( - std::vector<double>&& x, std::vector<double>&& y) + std::vector<double> x, std::vector<double> y) : PiecewiseLinearInterpolation(std::move(x), std::move(y), false) { if (!isStrongMonotonic()) diff --git a/MathLib/Curve/PiecewiseLinearMonotonicCurve.h b/MathLib/Curve/PiecewiseLinearMonotonicCurve.h index afa47dd2e40..1123d0ebf35 100644 --- a/MathLib/Curve/PiecewiseLinearMonotonicCurve.h +++ b/MathLib/Curve/PiecewiseLinearMonotonicCurve.h @@ -24,8 +24,8 @@ public: * @ x x coordinates of curve points * @ y y coordinates of curve points */ - PiecewiseLinearMonotonicCurve(std::vector<double>&& x, - std::vector<double>&& y); + PiecewiseLinearMonotonicCurve(std::vector<double> x, + std::vector<double> y); ~PiecewiseLinearMonotonicCurve() = default; diff --git a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp index 74aa4a3b205..e8d4db27c1b 100644 --- a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp +++ b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.cpp @@ -23,8 +23,8 @@ namespace MathLib { PiecewiseLinearInterpolation::PiecewiseLinearInterpolation( - std::vector<double>&& supporting_points, - std::vector<double>&& values_at_supp_pnts, + std::vector<double> supporting_points, + std::vector<double> values_at_supp_pnts, bool supp_pnts_sorted) : _supp_pnts(std::move(supporting_points)), _values_at_supp_pnts(std::move(values_at_supp_pnts)) diff --git a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h index f6fe80944d9..0cc4466e780 100644 --- a/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h +++ b/MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h @@ -45,8 +45,8 @@ public: * points are sorted * one can set the switch to true */ - PiecewiseLinearInterpolation(std::vector<double>&& supporting_points, - std::vector<double>&& values_at_supp_pnts, + PiecewiseLinearInterpolation(std::vector<double> supporting_points, + std::vector<double> values_at_supp_pnts, bool supp_pnts_sorted = false); /** -- GitLab