From: Jeff Garzik Date: Sun, 22 Apr 2012 18:01:25 +0000 (-0400) Subject: Change signed->unsigned at 3 code sites X-Git-Tag: v0.4.0-unstable~129^2~48^2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=735a60698c845f257a0f7e9b617d50669d9179d4 Change signed->unsigned at 3 code sites This resolves signed/unsigned comparison warnings. --- diff --git a/src/db.cpp b/src/db.cpp index 39a4189..53da378 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -648,7 +648,7 @@ bool CTxDB::LoadBlockIndex() } } // check level 4: check whether spent txouts were spent within the main chain - int nOutput = 0; + unsigned int nOutput = 0; if (nCheckLevel>3) { BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent) diff --git a/src/net.cpp b/src/net.cpp index 38c0d3d..d218dcf 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -498,7 +498,7 @@ void ThreadSocketHandler2(void* parg) { printf("ThreadSocketHandler started\n"); list vNodesDisconnected; - int nPrevNodeCount = 0; + unsigned int nPrevNodeCount = 0; loop { diff --git a/src/util.h b/src/util.h index fe8ca60..d9d8151 100644 --- a/src/util.h +++ b/src/util.h @@ -579,9 +579,9 @@ template class CMedianFilter private: std::vector vValues; std::vector vSorted; - int nSize; + unsigned int nSize; public: - CMedianFilter(int size, T initial_value): + CMedianFilter(unsigned int size, T initial_value): nSize(size) { vValues.reserve(size);