Skip to content

Commit

Permalink
[vector] with_more now takes by value instead of rvalue ref
Browse files Browse the repository at this point in the history
  • Loading branch information
harrand committed Feb 11, 2024
1 parent a02e905 commit f3fee3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tz/core/data/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ namespace tz
* @param end Value to be appended to the end of the resultant vector.
* @return vector with extra element appended.
*/
vector<T, S + 1> with_more(T&& end) const;
vector<T, S + 1> with_more(T end) const;
/**
* Create a new vector, with another vector appended to the end.
*
Expand Down
2 changes: 1 addition & 1 deletion src/tz/core/data/vector.inl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ namespace tz
}

template<tz::number T, std::size_t S>
vector<T, S + 1> vector<T, S>::with_more(T&& end) const
vector<T, S + 1> vector<T, S>::with_more(T end) const
{
std::array<T, S + 1> new_data;
std::copy(this->vec.begin(), this->vec.end(), new_data.begin());
Expand Down

0 comments on commit f3fee3d

Please sign in to comment.