Skip to content

Commit

Permalink
Change FdmLinearOpIterator to pass by value and move (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Mar 6, 2023
2 parents 1f44afe + 3875659 commit 1fb6118
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ namespace QuantLib {
explicit FdmLinearOpIterator(Size index = 0)
: index_(index) {}

explicit FdmLinearOpIterator(const std::vector<Size>& dim)
explicit FdmLinearOpIterator(std::vector<Size> dim)
: index_(0),
dim_(dim),
coordinates_(dim.size(), 0) {}
dim_(std::move(dim)),
coordinates_(dim_.size(), 0) {}

FdmLinearOpIterator(std::vector<Size> dim, std::vector<Size> coordinates, Size index)
: index_(index), dim_(std::move(dim)), coordinates_(std::move(coordinates)) {}
Expand Down

0 comments on commit 1fb6118

Please sign in to comment.