From 7bd9c3a3cf408175019f85ec33cfd4364e5f5d32 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Mon, 23 Apr 2012 14:14:03 -0400 Subject: SigOp and orphan-tx constants and counts are always unsigned. Fixes several sign-comparison warnings. --- src/script.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script.cpp') diff --git a/src/script.cpp b/src/script.cpp index 00c9990b8f..eb8200bcc3 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1360,9 +1360,9 @@ bool IsStandard(const CScript& scriptPubKey) } -int HaveKeys(const vector& pubkeys, const CKeyStore& keystore) +unsigned int HaveKeys(const vector& pubkeys, const CKeyStore& keystore) { - int nResult = 0; + unsigned int nResult = 0; BOOST_FOREACH(const valtype& pubkey, pubkeys) { CBitcoinAddress address; @@ -1566,9 +1566,9 @@ bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsig return true; } -int CScript::GetSigOpCount(bool fAccurate) const +unsigned int CScript::GetSigOpCount(bool fAccurate) const { - int n = 0; + unsigned int n = 0; const_iterator pc = begin(); opcodetype lastOpcode = OP_INVALIDOPCODE; while (pc < end()) @@ -1590,7 +1590,7 @@ int CScript::GetSigOpCount(bool fAccurate) const return n; } -int CScript::GetSigOpCount(const CScript& scriptSig) const +unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const { if (!IsPayToScriptHash()) return GetSigOpCount(true); -- cgit v1.2.3