diff options
| author | Daniel Kraft <[email protected]> | 2014-07-19 15:39:50 +0200 |
|---|---|---|
| committer | Daniel Kraft <[email protected]> | 2014-08-26 11:26:58 +0200 |
| commit | ffb4c210bc0b78bd8cbccdb7ccb80dde918a01b0 (patch) | |
| tree | 7c70b8fccf7555b43ca3dceda55fe1caaed25c5c /src | |
| parent | Merge pull request #4749 (diff) | |
| download | discoin-ffb4c210bc0b78bd8cbccdb7ccb80dde918a01b0.tar.xz discoin-ffb4c210bc0b78bd8cbccdb7ccb80dde918a01b0.zip | |
Mark LevelDB "Read" and "Exists" functions as const.
Mark the "Read" and "Exists" functions in CLevelDBWrapper as "const".
They do not change anything in the DB, by definition.
Diffstat (limited to 'src')
| -rw-r--r-- | src/leveldbwrapper.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h index 043a56bf3..452df9283 100644 --- a/src/leveldbwrapper.h +++ b/src/leveldbwrapper.h @@ -82,7 +82,7 @@ public: CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory = false, bool fWipe = false); ~CLevelDBWrapper(); - template<typename K, typename V> bool Read(const K& key, V& value) throw(leveldb_error) { + template<typename K, typename V> bool Read(const K& key, V& value) const throw(leveldb_error) { CDataStream ssKey(SER_DISK, CLIENT_VERSION); ssKey.reserve(ssKey.GetSerializeSize(key)); ssKey << key; @@ -111,7 +111,7 @@ public: return WriteBatch(batch, fSync); } - template<typename K> bool Exists(const K& key) throw(leveldb_error) { + template<typename K> bool Exists(const K& key) const throw(leveldb_error) { CDataStream ssKey(SER_DISK, CLIENT_VERSION); ssKey.reserve(ssKey.GetSerializeSize(key)); ssKey << key; |