From: CryptoManiac Date: Thu, 11 Feb 2016 09:43:56 +0000 (-0800) Subject: Fix compilation errors. X-Git-Tag: nvc-v0.5.6~93 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=86a0b22dd1b6f8f108bd2e7184bfecb9a23c52b2 Fix compilation errors. GCC doesn't like 0LL here. --- diff --git a/src/kernelrecord.cpp b/src/kernelrecord.cpp index a9a2e8e..9c61d06 100644 --- a/src/kernelrecord.cpp +++ b/src/kernelrecord.cpp @@ -47,7 +47,7 @@ vector KernelRecord::decomposeOutput(const CWallet *wallet, const CTxDestination address; std::string addrStr; - uint64_t coinAge = max( (txOut.nValue * nDayWeight) / (COIN * nOneDay), 0LL); + uint64_t coinAge = max( (txOut.nValue * nDayWeight) / (COIN * nOneDay), (int64_t)0); if (ExtractDestination(txOut.scriptPubKey, address)) { @@ -107,7 +107,7 @@ double KernelRecord::getProbToMintStake(double difficulty, int timeOffset) const //uint64_t coinAge = max(nValue * dayWeight / COIN, (int64_t)0); //return target * coinAge / pow(static_cast(2), 256); int64_t Weight = (min((GetAdjustedTime() - nTime) + timeOffset, (int64_t)(nStakeMinAge+nStakeMaxAge)) - nStakeMinAge); - uint64_t coinAge = max(nValue * Weight / (COIN * nOneDay), 0LL); + uint64_t coinAge = max(nValue * Weight / (COIN * nOneDay), (int64_t)0); return coinAge / (pow(static_cast(2),32) * difficulty); }