aboutsummaryrefslogtreecommitdiff
path: root/src/coins.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-12-15 09:11:16 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-01-05 15:45:34 +0100
commit4f1524966a99c83db8c0c9f1ff74789253a1171e (patch)
tree9107f58fdd2c91af6c82e9b2e09a8af36c3d6ca6 /src/coins.cpp
parent5d3064bc44e0b608a428e230f384bd3f846dedca (diff)
downloadbitcoin-4f1524966a99c83db8c0c9f1ff74789253a1171e.tar.xz
Replace direct use of 0 with SetNull and IsNull
Replace x=0 with .SetNull(), x==0 with IsNull(), x!=0 with !IsNull(). Replace uses of uint256(0) with uint256().
Diffstat (limited to 'src/coins.cpp')
-rw-r--r--src/coins.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/coins.cpp b/src/coins.cpp
index f4599ff39d..ef4f96fdee 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -42,7 +42,7 @@ bool CCoins::Spend(uint32_t nPos)
bool CCoinsView::GetCoins(const uint256 &txid, CCoins &coins) const { return false; }
bool CCoinsView::HaveCoins(const uint256 &txid) const { return false; }
-uint256 CCoinsView::GetBestBlock() const { return uint256(0); }
+uint256 CCoinsView::GetBestBlock() const { return uint256(); }
bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; }
bool CCoinsView::GetStats(CCoinsStats &stats) const { return false; }
@@ -57,7 +57,7 @@ bool CCoinsViewBacked::GetStats(CCoinsStats &stats) const { return base->GetStat
CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
-CCoinsViewCache::CCoinsViewCache(CCoinsView *baseIn) : CCoinsViewBacked(baseIn), hasModifier(false), hashBlock(0) { }
+CCoinsViewCache::CCoinsViewCache(CCoinsView *baseIn) : CCoinsViewBacked(baseIn), hasModifier(false) { }
CCoinsViewCache::~CCoinsViewCache()
{
@@ -128,7 +128,7 @@ bool CCoinsViewCache::HaveCoins(const uint256 &txid) const {
}
uint256 CCoinsViewCache::GetBestBlock() const {
- if (hashBlock == uint256(0))
+ if (hashBlock.IsNull())
hashBlock = base->GetBestBlock();
return hashBlock;
}