diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-15 09:11:16 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-05 15:45:34 +0100 |
commit | 4f1524966a99c83db8c0c9f1ff74789253a1171e (patch) | |
tree | 9107f58fdd2c91af6c82e9b2e09a8af36c3d6ca6 /src/primitives/block.cpp | |
parent | 5d3064bc44e0b608a428e230f384bd3f846dedca (diff) |
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/primitives/block.cpp')
-rw-r--r-- | src/primitives/block.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp index 2b6a302ee9..3b4a360395 100644 --- a/src/primitives/block.cpp +++ b/src/primitives/block.cpp @@ -74,7 +74,7 @@ uint256 CBlock::BuildMerkleTree(bool* fMutated) const if (fMutated) { *fMutated = mutated; } - return (vMerkleTree.empty() ? 0 : vMerkleTree.back()); + return (vMerkleTree.empty() ? uint256() : vMerkleTree.back()); } std::vector<uint256> CBlock::GetMerkleBranch(int nIndex) const @@ -96,7 +96,7 @@ std::vector<uint256> CBlock::GetMerkleBranch(int nIndex) const uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMerkleBranch, int nIndex) { if (nIndex == -1) - return 0; + return uint256(); for (std::vector<uint256>::const_iterator it(vMerkleBranch.begin()); it != vMerkleBranch.end(); ++it) { if (nIndex & 1) |