mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-22 23:42:24 +00:00
remove std::move from return statements (pessimizing-move warning)
This commit is contained in:
parent
629d5b7689
commit
0aefb2f60a
1 changed files with 2 additions and 2 deletions
|
@ -4967,7 +4967,7 @@ std::string wallet2::encrypt(const std::string &plaintext, const crypto::secret_
|
||||||
crypto::signature &signature = *(crypto::signature*)&ciphertext[ciphertext.size() - sizeof(crypto::signature)];
|
crypto::signature &signature = *(crypto::signature*)&ciphertext[ciphertext.size() - sizeof(crypto::signature)];
|
||||||
crypto::generate_signature(hash, pkey, skey, signature);
|
crypto::generate_signature(hash, pkey, skey, signature);
|
||||||
}
|
}
|
||||||
return std::move(ciphertext);
|
return ciphertext;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
std::string wallet2::encrypt_with_view_secret_key(const std::string &plaintext, bool authenticated) const
|
std::string wallet2::encrypt_with_view_secret_key(const std::string &plaintext, bool authenticated) const
|
||||||
|
@ -4997,7 +4997,7 @@ std::string wallet2::decrypt(const std::string &ciphertext, const crypto::secret
|
||||||
error::wallet_internal_error, "Failed to authenticate criphertext");
|
error::wallet_internal_error, "Failed to authenticate criphertext");
|
||||||
}
|
}
|
||||||
crypto::chacha8(ciphertext.data() + sizeof(iv), ciphertext.size() - prefix_size, key, iv, &plaintext[0]);
|
crypto::chacha8(ciphertext.data() + sizeof(iv), ciphertext.size() - prefix_size, key, iv, &plaintext[0]);
|
||||||
return std::move(plaintext);
|
return plaintext;
|
||||||
}
|
}
|
||||||
//----------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------
|
||||||
std::string wallet2::decrypt_with_view_secret_key(const std::string &ciphertext, bool authenticated) const
|
std::string wallet2::decrypt_with_view_secret_key(const std::string &ciphertext, bool authenticated) const
|
||||||
|
|
Loading…
Reference in a new issue