From a57845c20e96825f1256e6b7f46d67d205c859e0 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Fri, 27 Jan 2017 10:34:06 +0900 Subject: Refactor: Remove using namespace from util* --- src/utilmoneystr.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/utilmoneystr.cpp') diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp index bebe56130d..6e6e33184e 100644 --- a/src/utilmoneystr.cpp +++ b/src/utilmoneystr.cpp @@ -9,8 +9,6 @@ #include "tinyformat.h" #include "utilstrencodings.h" -using namespace std; - std::string FormatMoney(const CAmount& n) { // Note: not using straight sprintf here because we do NOT want @@ -18,7 +16,7 @@ std::string FormatMoney(const CAmount& n) int64_t n_abs = (n > 0 ? n : -n); int64_t quotient = n_abs/COIN; int64_t remainder = n_abs%COIN; - string str = strprintf("%d.%08d", quotient, remainder); + std::string str = strprintf("%d.%08d", quotient, remainder); // Right-trim excess zeros before the decimal point: int nTrim = 0; @@ -33,14 +31,14 @@ std::string FormatMoney(const CAmount& n) } -bool ParseMoney(const string& str, CAmount& nRet) +bool ParseMoney(const std::string& str, CAmount& nRet) { return ParseMoney(str.c_str(), nRet); } bool ParseMoney(const char* pszIn, CAmount& nRet) { - string strWhole; + std::string strWhole; int64_t nUnits = 0; const char* p = pszIn; while (isspace(*p)) -- cgit v1.2.3