Commit 032caf72 authored by Damien L-G's avatar Damien L-G

Get rid of the two constructors for Spline2D take arrays by value and move them into place

parent 25297946
......@@ -62,16 +62,8 @@ template <> struct Interp2DTypeTraits<Bicubic> {
template <typename T> class Spline2D {
public:
Spline2D(std::vector<double> const &xa, std::vector<double> const &ya,
std::vector<double> const &za)
: _xa{xa}, _ya{ya}, _za{za},
_spline{_check_grid_points_and_build_interpolation_object(_xa, _ya)} {
_check_arrays_properly_sized(_xa, _ya, _za);
gsl_interp2d_init(_spline, _xa.data(), _ya.data(), _za.data(), _xa.size(),
_ya.size());
}
Spline2D(std::vector<double> &&xa, std::vector<double> &&ya,
std::vector<double> &&za)
Spline2D(std::vector<double> xa, std::vector<double> ya,
std::vector<double> za)
: _xa{std::move(xa)}, _ya{std::move(ya)}, _za{std::move(za)},
_spline{_check_grid_points_and_build_interpolation_object(_xa, _ya)} {
_check_arrays_properly_sized(_xa, _ya, _za);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment