diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-04-15 16:52:09 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-04-15 16:52:09 -0400 |
commit | c376ac359ec8551823b4ee14c85d85a49f2d3436 (patch) | |
tree | 121093f97279ca969a424f3792e64c41f8a05b48 /src/main.h | |
parent | ab9dc75a183c7a46e38e957ee3192d5febcccb3c (diff) |
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 a89c0935fe..c48252fbc4 100644 --- a/src/main.h +++ b/src/main.h @@ -457,13 +457,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) { @@ -637,9 +637,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"); } |