diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2014-02-26 12:16:03 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2014-02-26 12:16:03 -0500 |
commit | e3e65d29b70c64808b3ab5c58ce0b3bcefaadc5d (patch) | |
tree | 9453db3d22436dcd60c45ce880ecf7c0b683850f /src/util.cpp | |
parent | 3480bf7c650bb14a31020c3ef33e76edea650e13 (diff) | |
parent | 2f5da74362fb65201f1403bba3c63ce5e9d024e7 (diff) |
Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completely
Remove PRIx64 usage completely
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.cpp b/src/util.cpp index 8cfd1c2e03..4e326ffcf4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -330,7 +330,7 @@ string FormatMoney(int64_t n, bool fPlus) int64_t n_abs = (n > 0 ? n : -n); int64_t quotient = n_abs/COIN; int64_t remainder = n_abs%COIN; - string str = strprintf("%"PRId64".%08"PRId64, quotient, remainder); + string str = strprintf("%d.%08d", quotient, remainder); // Right-trim excess zeros before the decimal point: int nTrim = 0; @@ -1278,7 +1278,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nTime) // Add data static CMedianFilter<int64_t> vTimeOffsets(200,0); vTimeOffsets.input(nOffsetSample); - LogPrintf("Added time data, samples %d, offset %+"PRId64" (%+"PRId64" minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60); + LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60); if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1) { int64_t nMedian = vTimeOffsets.median(); @@ -1313,10 +1313,10 @@ void AddTimeData(const CNetAddr& ip, int64_t nTime) } if (fDebug) { BOOST_FOREACH(int64_t n, vSorted) - LogPrintf("%+"PRId64" ", n); + LogPrintf("%+d ", n); LogPrintf("| "); } - LogPrintf("nTimeOffset = %+"PRId64" (%+"PRId64" minutes)\n", nTimeOffset, nTimeOffset/60); + LogPrintf("nTimeOffset = %+d (%+d minutes)\n", nTimeOffset, nTimeOffset/60); } } |