aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 8cfd1c2e03..36dfd8ab79 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;
@@ -948,15 +948,6 @@ void LogException(std::exception* pex, const char* pszThread)
LogPrintf("\n%s", message);
}
-void PrintException(std::exception* pex, const char* pszThread)
-{
- std::string message = FormatException(pex, pszThread);
- LogPrintf("\n\n************************\n%s\n", message);
- fprintf(stderr, "\n\n************************\n%s\n", message.c_str());
- strMiscWarning = message;
- throw;
-}
-
void PrintExceptionContinue(std::exception* pex, const char* pszThread)
{
std::string message = FormatException(pex, pszThread);
@@ -1278,7 +1269,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 +1304,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);
}
}