aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-05-01 17:49:17 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-05-01 17:49:17 -0400
commit24de922636e664ac5f6a2189055e4c0b76dac0b7 (patch)
tree2455aca09180d3d9fe59a2328886c884b1ac377b /src/main.h
parent50d710496dabcfe8d771483fcfe16d52953ec73c (diff)
CDiskTxPos, CInPoint, COutPoint: cast null value (-1) to unsigned int
to eliminate signed/unsigned comparison warnings
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.h b/src/main.h
index 262e77e806..caaf4f8499 100644
--- a/src/main.h
+++ b/src/main.h
@@ -136,8 +136,8 @@ public:
}
IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); )
- void SetNull() { nFile = -1; nBlockPos = 0; nTxPos = 0; }
- bool IsNull() const { return (nFile == -1); }
+ void SetNull() { nFile = (unsigned int) -1; nBlockPos = 0; nTxPos = 0; }
+ bool IsNull() const { return (nFile == (unsigned int) -1); }
friend bool operator==(const CDiskTxPos& a, const CDiskTxPos& b)
{
@@ -176,8 +176,8 @@ public:
CInPoint() { SetNull(); }
CInPoint(CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; }
- void SetNull() { ptx = NULL; n = -1; }
- bool IsNull() const { return (ptx == NULL && n == -1); }
+ void SetNull() { ptx = NULL; n = (unsigned int) -1; }
+ bool IsNull() const { return (ptx == NULL && n == (unsigned int) -1); }
};
@@ -192,8 +192,8 @@ public:
COutPoint() { SetNull(); }
COutPoint(uint256 hashIn, unsigned int nIn) { hash = hashIn; n = nIn; }
IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); )
- void SetNull() { hash = 0; n = -1; }
- bool IsNull() const { return (hash == 0 && n == -1); }
+ void SetNull() { hash = 0; n = (unsigned int) -1; }
+ bool IsNull() const { return (hash == 0 && n == (unsigned int) -1); }
friend bool operator<(const COutPoint& a, const COutPoint& b)
{