From 0adb53d61133271fad88acb23b019e98e954acc0 Mon Sep 17 00:00:00 2001 From: MASM fan Date: Mon, 24 Nov 2014 21:48:55 +0400 Subject: [PATCH] Refactoring Change encoding of kernelrecord.cpp file to UTF-8; Use correct format specifier for size_t variables. --- src/kernelrecord.cpp | 6 +++--- src/wallet.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kernelrecord.cpp b/src/kernelrecord.cpp index 8c1d778..54f71e9 100644 --- a/src/kernelrecord.cpp +++ b/src/kernelrecord.cpp @@ -33,11 +33,11 @@ vector KernelRecord::decomposeOutput(const CWallet *wallet, const int64 nTime = wtx.GetTxTime(); uint256 hash = wtx.GetHash(); std::map mapValue = wtx.mapValue; - int64 nDayWeight = (min((GetAdjustedTime() - nTime), (int64)(nStakeMaxAge+nStakeMinAge)) - nStakeMinAge); // DayWeight * 86400, ÷òîáû áûë - // ïðàâèëüíûé ðàñ÷¸ò CoinAge + int64 nDayWeight = (min((GetAdjustedTime() - nTime), (int64)(nStakeMaxAge+nStakeMinAge)) - nStakeMinAge); // DayWeight * 86400, чтобы был + // правильный расчёт CoinAge if (showTransaction(wtx)) { - for (int nOut = 0; nOut < wtx.vout.size(); nOut++) + for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++) { CTxOut txOut = wtx.vout[nOut]; if( wallet->IsMine(txOut) ) { diff --git a/src/wallet.cpp b/src/wallet.cpp index 96dbdeb..87e487f 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1681,7 +1681,7 @@ bool CWallet::GetStakeWeight(const CKeyStore& keystore, uint64& nMinWeight, uint } if (fDebug) - printf("Get stake weight: %d meta items loaded for %d coins\n", mapMeta.size(), setCoins.size()); + printf("Get stake weight: %"PRIszu" meta items loaded for %"PRIszu" coins\n", mapMeta.size(), setCoins.size()); fCoinsDataActual = true; } @@ -1914,7 +1914,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int } if (fDebug) - printf("Stake miner: %d meta items loaded for %d coins\n", mapMeta.size(), setCoins.size()); + printf("Stake miner: %"PRIszu" meta items loaded for %"PRIszu" coins\n", mapMeta.size(), setCoins.size()); fCoinsDataActual = true; } -- 1.7.1