diff --git a/include/nix/Dimensions.hpp b/include/nix/Dimensions.hpp index a418bbafe..51a543ee8 100644 --- a/include/nix/Dimensions.hpp +++ b/include/nix/Dimensions.hpp @@ -847,8 +847,7 @@ class NIXAPI RangeDimension : public base::ImplContainer * @return Start and end indices returned in a boost::optional * which is invalid if out of range. */ - boost::optional> indexOf(double start, double end, - std::vector &&ticks, + boost::optional> indexOf(double start, double end, std::vector ticks, RangeMatch match = RangeMatch::Inclusive) const; diff --git a/src/Dimensions.cpp b/src/Dimensions.cpp index 4ee54057e..9be96c840 100644 --- a/src/Dimensions.cpp +++ b/src/Dimensions.cpp @@ -625,7 +625,7 @@ boost::optional RangeDimension::indexOf(const double position, Positio boost::optional> RangeDimension::indexOf(double start, double end, - std::vector &&ticks, + std::vector ticks, RangeMatch match) const { if (ticks.size() == 0) { ticks = this->ticks(); @@ -698,7 +698,7 @@ std::vector>> RangeDimension::inde vector ticks = this->ticks(); for (size_t i = 0; i < start_positions.size(); ++i) { boost::optional> range; - range = this->indexOf(start_positions[i], end_positions[i], std::move(ticks), match); + range = this->indexOf(start_positions[i], end_positions[i], ticks, match); indices.push_back(range); } return indices;