diff --git a/passphrase_cache.cc b/passphrase_cache.cc index 4c5d7cc..fb9a63e 100644 --- a/passphrase_cache.cc +++ b/passphrase_cache.cc @@ -1,7 +1,7 @@ #include "passphrase_cache.hh" namespace pEp { - const char *PassphraseCache::add(std::string passphrase) + const char *PassphraseCache::add(std::string&& passphrase) { std::lock_guard lock(_mtx); diff --git a/passphrase_cache.hh b/passphrase_cache.hh index f47490e..b186348 100644 --- a/passphrase_cache.hh +++ b/passphrase_cache.hh @@ -38,7 +38,7 @@ namespace pEp { // adding a passphrase to the cache, which will timeout - const char *add(std::string passphrase); + const char *add(std::string&& passphrase); // for each passphrase call the callee until it returns true for a // matching passphrase or no passphrases are left