From 2dd3c53bdcd31595b5a0ab36fc832546f6b34458 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sat, 27 Jun 2020 17:05:24 +0200 Subject: [PATCH] returning const char * from the original std::string object --- passphrase_cache.cc | 2 +- passphrase_cache.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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