X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.cpp;h=0a19fe92557b174df12e64836920ffaf4da4ff9d;hb=1ebe5b92ef18395cdae9b88fc38b0ed6166c3243;hp=0f84938e68dde29e0c7344f583f7e8e231987eeb;hpb=a303a6ee32ebc04eb261db780f1e968f58d6e260;p=novacoin.git diff --git a/src/util.cpp b/src/util.cpp index 0f84938..0a19fe9 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -34,12 +34,6 @@ namespace boost { #include #ifdef WIN32 -#ifdef _MSC_VER -#pragma warning(disable:4786) -#pragma warning(disable:4804) -#pragma warning(disable:4805) -#pragma warning(disable:4717) -#endif #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif @@ -408,16 +402,16 @@ string FormatMoney(int64_t n, bool fPlus) string str = strprintf("%" PRId64 ".%06" PRId64, quotient, remainder); // Right-trim excess zeros before the decimal point: - int nTrim = 0; + size_t nTrim = 0; for (size_t i = str.size()-1; (str[i] == '0' && isdigit(str[i-2])); --i) ++nTrim; if (nTrim) str.erase(str.size()-nTrim, nTrim); if (n < 0) - str.insert((unsigned int)0, 1, '-'); + str.insert(0u, 1, '-'); else if (fPlus && n > 0) - str.insert((unsigned int)0, 1, '+'); + str.insert(0u, 1, '+'); return str; } @@ -1500,4 +1494,4 @@ std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime) ss.imbue(loc); ss << boost::posix_time::from_time_t(nTime); return ss.str(); -} \ No newline at end of file +}