simplify CDBEnv::Open() / fix small glitches

- remove pathEnv from CDBEnv, as this attribute is not needed
- change path parameter in ::Open() to a reference
- make nDbCache variable an unsigned integer
- remove a missplaced ";" behin ::IsMock()
This commit is contained in:
Philip Kaufmann
2012-11-09 22:51:40 +01:00
parent 20db1c099e
commit c74bae0fdf
2 changed files with 7 additions and 10 deletions

View File

@@ -33,7 +33,6 @@ class CDBEnv
private:
bool fDbEnvInit;
bool fMockDb;
boost::filesystem::path pathEnv;
void EnvShutdown();
@@ -46,7 +45,7 @@ public:
CDBEnv();
~CDBEnv();
void MakeMock();
bool IsMock() { return fMockDb; };
bool IsMock() { return fMockDb; }
/*
* Verify that database file strFile is OK. If it is not,
@@ -66,7 +65,7 @@ public:
typedef std::pair<std::vector<unsigned char>, std::vector<unsigned char> > KeyValPair;
bool Salvage(std::string strFile, bool fAggressive, std::vector<KeyValPair>& vResult);
bool Open(boost::filesystem::path pathEnv_);
bool Open(const boost::filesystem::path &path);
void Close();
void Flush(bool fShutdown);
void CheckpointLSN(std::string strFile);