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.
This commit is contained in:
Jeff Garzik
2012-04-15 16:52:09 -04:00
committed by Jeff Garzik
parent ab9dc75a18
commit c376ac359e
10 changed files with 44 additions and 44 deletions

View File

@@ -402,7 +402,7 @@ public:
bool UpdateSpent(const std::vector<char>& vfNewSpent)
{
bool fReturn = false;
for (int i=0; i < vfNewSpent.size(); i++)
for (unsigned int i = 0; i < vfNewSpent.size(); i++)
{
if (i == vfSpent.size())
break;
@@ -488,7 +488,7 @@ public:
return nAvailableCreditCached;
int64 nCredit = 0;
for (int i = 0; i < vout.size(); i++)
for (unsigned int i = 0; i < vout.size(); i++)
{
if (!IsSpent(i))
{
@@ -541,7 +541,7 @@ public:
std::vector<const CMerkleTx*> vWorkQueue;
vWorkQueue.reserve(vtxPrev.size()+1);
vWorkQueue.push_back(this);
for (int i = 0; i < vWorkQueue.size(); i++)
for (unsigned int i = 0; i < vWorkQueue.size(); i++)
{
const CMerkleTx* ptx = vWorkQueue[i];