aboutsummaryrefslogtreecommitdiff
path: root/src/db.h
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-09-16 15:16:29 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-09-18 07:21:49 +0200
commit22d7e7014f2064fb9e52c634f68b3c5e965faec0 (patch)
treee958045998cf5cb60b30a3915e4b08f84731e9a9 /src/db.h
parent438c7e4cd2179170aeadb4aa1c902ccd1256dee6 (diff)
downloadbitcoin-22d7e7014f2064fb9e52c634f68b3c5e965faec0.tar.xz
prefer const string& over char* in CDB and CWalletDB constructor
- also make parameter of CDBEnv::CheckpointLSN a constant reference
Diffstat (limited to 'src/db.h')
-rw-r--r--src/db.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/db.h b/src/db.h
index 999750ff3f..eab27f43af 100644
--- a/src/db.h
+++ b/src/db.h
@@ -69,7 +69,7 @@ public:
bool Open(const boost::filesystem::path &path);
void Close();
void Flush(bool fShutdown);
- void CheckpointLSN(std::string strFile);
+ void CheckpointLSN(const std::string& strFile);
void CloseDb(const std::string& strFile);
bool RemoveDb(const std::string& strFile);
@@ -96,11 +96,13 @@ protected:
DbTxn *activeTxn;
bool fReadOnly;
- explicit CDB(const char* pszFile, const char* pszMode="r+");
+ explicit CDB(const std::string& strFilename, const char* pszMode="r+");
~CDB() { Close(); }
+
public:
void Flush();
void Close();
+
private:
CDB(const CDB&);
void operator=(const CDB&);