mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Refactor: Remove using namespace <xxx> from util*
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user