aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-07-07 00:54:42 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-07-07 10:45:31 -0700
commit0aadc11fd88b298c7af2dfb69763b2c67dc6b7b0 (patch)
tree02bb833749f472a916c9ff5f585af9e94b5326b8 /src/txdb.cpp
parent5af6572534986bf85f6806e2cc66c1f1f8e3c56c (diff)
Avoid dereference-of-casted-pointer
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 002f6550bc..aa0b73a417 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -172,7 +172,7 @@ bool CBlockTreeDB::ReadLastBlockFile(int &nFile) {
CCoinsViewCursor *CCoinsViewDB::Cursor() const
{
- CCoinsViewDBCursor *i = new CCoinsViewDBCursor(const_cast<CDBWrapper*>(&db)->NewIterator(), GetBestBlock());
+ CCoinsViewDBCursor *i = new CCoinsViewDBCursor(const_cast<CDBWrapper&>(db).NewIterator(), GetBestBlock());
/* It seems that there are no "const iterators" for LevelDB. Since we
only need read operations on it, use a const-cast to get around
that restriction. */