aboutsummaryrefslogtreecommitdiff
path: root/src/utilmoneystr.cpp
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2017-01-27 10:34:06 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2017-03-08 08:47:02 -0800
commita57845c20e96825f1256e6b7f46d67d205c859e0 (patch)
treeb23c938430cfc2734831903ed0e00c3ab67b5746 /src/utilmoneystr.cpp
parent8a5228197cec2e65f53bffe269c08ce94c440048 (diff)
downloadbitcoin-a57845c20e96825f1256e6b7f46d67d205c859e0.tar.xz
Refactor: Remove using namespace <xxx> from util*
Diffstat (limited to 'src/utilmoneystr.cpp')
-rw-r--r--src/utilmoneystr.cpp8
1 files changed, 3 insertions, 5 deletions
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))