aboutsummaryrefslogtreecommitdiff
path: root/src/utilmoneystr.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-03-09 08:10:09 +0100
committerWladimir J. van der Laan <[email protected]>2017-03-09 08:12:59 +0100
commitc047b1663d47c7b33aa046809201848c200a3ceb (patch)
treeb23c938430cfc2734831903ed0e00c3ab67b5746 /src/utilmoneystr.cpp
parentMerge #9952: Add historical release notes for 0.14.0 (diff)
parentRefactor: Remove using namespace <xxx> from util* (diff)
downloaddiscoin-c047b1663d47c7b33aa046809201848c200a3ceb.tar.xz
discoin-c047b1663d47c7b33aa046809201848c200a3ceb.zip
Merge #9643: [refactor] Remove using namespace <xxx> from wallet/ & util*
a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm) 8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm) Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
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 bebe56130..6e6e33184 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))