aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wallet/db.cpp4
-rw-r--r--src/wallet/db.h4
-rw-r--r--src/wallet/wallet.cpp2
-rw-r--r--src/wallet/wallet.h2
-rw-r--r--src/wallet/walletdb.cpp4
-rw-r--r--src/wallet/walletdb.h4
6 files changed, 10 insertions, 10 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 36946b7dcc..53cfcf0961 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -148,7 +148,7 @@ void CDBEnv::MakeMock()
fMockDb = true;
}
-CDBEnv::VerifyResult CDBEnv::Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile))
+CDBEnv::VerifyResult CDBEnv::Verify(const std::string& strFile, bool (*recoverFunc)(CDBEnv& dbenv, const std::string& strFile))
{
LOCK(cs_db);
assert(mapFileUseCount.count(strFile) == 0);
@@ -165,7 +165,7 @@ CDBEnv::VerifyResult CDBEnv::Verify(std::string strFile, bool (*recoverFunc)(CDB
return (fRecovered ? RECOVER_OK : RECOVER_FAIL);
}
-bool CDBEnv::Salvage(std::string strFile, bool fAggressive, std::vector<CDBEnv::KeyValPair>& vResult)
+bool CDBEnv::Salvage(const std::string& strFile, bool fAggressive, std::vector<CDBEnv::KeyValPair>& vResult)
{
LOCK(cs_db);
assert(mapFileUseCount.count(strFile) == 0);
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 71133f9699..0c2c139d89 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -59,7 +59,7 @@ public:
enum VerifyResult { VERIFY_OK,
RECOVER_OK,
RECOVER_FAIL };
- VerifyResult Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile));
+ VerifyResult Verify(const std::string& strFile, bool (*recoverFunc)(CDBEnv& dbenv, const std::string& strFile));
/**
* Salvage data from a file that Verify says is bad.
* fAggressive sets the DB_AGGRESSIVE flag (see berkeley DB->verify() method documentation).
@@ -68,7 +68,7 @@ public:
* for huge databases.
*/
typedef std::pair<std::vector<unsigned char>, std::vector<unsigned char> > KeyValPair;
- bool Salvage(std::string strFile, bool fAggressive, std::vector<KeyValPair>& vResult);
+ bool Salvage(const std::string& strFile, bool fAggressive, std::vector<KeyValPair>& vResult);
bool Open(const boost::filesystem::path& path);
void Close();
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 44b416d496..167639b53d 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -345,7 +345,7 @@ void CWallet::Flush(bool shutdown)
bitdb.Flush(shutdown);
}
-bool CWallet::Verify(const string walletFile, string& warningString, string& errorString)
+bool CWallet::Verify(const string& walletFile, string& warningString, string& errorString)
{
if (!bitdb.Open(GetDataDir()))
{
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index fbcb56685e..3f5f2859b6 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -747,7 +747,7 @@ public:
void Flush(bool shutdown=false);
//! Verify the wallet database and perform salvage if required
- static bool Verify(const std::string walletFile, std::string& warningString, std::string& errorString);
+ static bool Verify(const std::string& walletFile, std::string& warningString, std::string& errorString);
/**
* Address book entry changed.
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 880026d187..d7f70e435e 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -891,7 +891,7 @@ bool BackupWallet(const CWallet& wallet, const string& strDest)
//
// Try to (very carefully!) recover wallet.dat if there is a problem.
//
-bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
+bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKeys)
{
// Recovery procedure:
// move wallet.dat to wallet.timestamp.bak
@@ -968,7 +968,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
return fSuccess;
}
-bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename)
+bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename)
{
return CWalletDB::Recover(dbenv, filename, false);
}
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index 6aa0fa40df..a1c38b9d3d 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -127,8 +127,8 @@ public:
DBErrors LoadWallet(CWallet* pwallet);
DBErrors FindWalletTx(CWallet* pwallet, std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx);
DBErrors ZapWalletTx(CWallet* pwallet, std::vector<CWalletTx>& vWtx);
- static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys);
- static bool Recover(CDBEnv& dbenv, std::string filename);
+ static bool Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKeys);
+ static bool Recover(CDBEnv& dbenv, const std::string& filename);
private:
CWalletDB(const CWalletDB&);