Skip to content

Commit

Permalink
clang-tidy: Address cppcoreguidelines-rvalue-reference-param-not-moved
Browse files Browse the repository at this point in the history
  • Loading branch information
krivenko committed May 13, 2024
1 parent bfd857c commit 6e264cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/libcommute/expression/expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ template <typename ScalarType, typename... IndexTypes> class expression {
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
bool is_new_monomial;
typename monomials_map_t::iterator it;
std::tie(it, is_new_monomial) = target.emplace(m, coeff);
std::tie(it, is_new_monomial) = target.emplace(std::move(m), coeff);
if(!is_new_monomial) {
add_assign(it->second, coeff);
if(scalar_traits<ScalarType>::is_zero(it->second)) target.erase(it);
Expand Down

0 comments on commit 6e264cc

Please sign in to comment.