diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-04-15 16:52:09 -0400 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-04-17 14:59:32 -0400 |
commit | 0c3aa881e2ac7a6142fcfcbb9b7d2824532fe522 (patch) | |
tree | c3205a1993fa5e2bc5c2b82e692cb36c8bc84d71 /src/main.h | |
parent | 3374c3ef094b328e6c6957fdaf5a9abff0c53a33 (diff) | |
download | bitcoin-0c3aa881e2ac7a6142fcfcbb9b7d2824532fe522.tar.xz |
Fix loop index var types, fixing many minor sign comparison warnings
foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.
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 e89258699d..2f07372dfc 100644 --- a/src/main.h +++ b/src/main.h @@ -456,13 +456,13 @@ public: { if (vin.size() != old.vin.size()) return false; - for (int i = 0; i < vin.size(); i++) + for (unsigned int i = 0; i < vin.size(); i++) if (vin[i].prevout != old.vin[i].prevout) return false; bool fNewer = false; unsigned int nLowest = std::numeric_limits<unsigned int>::max(); - for (int i = 0; i < vin.size(); i++) + for (unsigned int i = 0; i < vin.size(); i++) { if (vin[i].nSequence != old.vin[i].nSequence) { @@ -636,9 +636,9 @@ public: vin.size(), vout.size(), nLockTime); - for (int i = 0; i < vin.size(); i++) + for (unsigned int i = 0; i < vin.size(); i++) str += " " + vin[i].ToString() + "\n"; - for (int i = 0; i < vout.size(); i++) + for (unsigned int i = 0; i < vout.size(); i++) str += " " + vout[i].ToString() + "\n"; return str; } @@ -1006,13 +1006,13 @@ public: hashMerkleRoot.ToString().substr(0,10).c_str(), nTime, nBits, nNonce, vtx.size()); - for (int i = 0; i < vtx.size(); i++) + for (unsigned int i = 0; i < vtx.size(); i++) { printf(" "); vtx[i].print(); } printf(" vMerkleTree: "); - for (int i = 0; i < vMerkleTree.size(); i++) + for (unsigned int i = 0; i < vMerkleTree.size(); i++) printf("%s ", vMerkleTree[i].ToString().substr(0,10).c_str()); printf("\n"); } |