diff options
| author | Jeff Garzik <[email protected]> | 2012-05-08 13:50:27 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-05-08 13:50:27 -0700 |
| commit | a2ea7975936cab4c56dd737de37004ae3298104d (patch) | |
| tree | b3ab8e38d3f52085d5389a2f85341c4cbdd8b02a /src/main.h | |
| parent | Merge pull request #841 from sipa/getalltransactions (diff) | |
| parent | EvalScript(): cast to avoid signed/unsigned warning (diff) | |
| download | discoin-a2ea7975936cab4c56dd737de37004ae3298104d.tar.xz discoin-a2ea7975936cab4c56dd737de37004ae3298104d.zip | |
Merge pull request #1180 from jgarzik/sign-compare
Fix final sign comparison warnings
Diffstat (limited to 'src/main.h')
| -rw-r--r-- | src/main.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.h b/src/main.h index c48b57b93..965100d6d 100644 --- a/src/main.h +++ b/src/main.h @@ -138,8 +138,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) { @@ -178,8 +178,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); } }; @@ -194,8 +194,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) { |