mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-09 14:41:42 +02:00
util: Remove unused ParseMoney that takes a c_str
This commit is contained in:
parent
e5753fa4e8
commit
fab30b61eb
@ -36,14 +36,10 @@ bool ParseMoney(const std::string& str, CAmount& nRet)
|
|||||||
if (!ValidAsCString(str)) {
|
if (!ValidAsCString(str)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ParseMoney(str.c_str(), nRet);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ParseMoney(const char* pszIn, CAmount& nRet)
|
|
||||||
{
|
|
||||||
std::string strWhole;
|
std::string strWhole;
|
||||||
int64_t nUnits = 0;
|
int64_t nUnits = 0;
|
||||||
const char* p = pszIn;
|
const char* p = str.c_str();
|
||||||
while (IsSpace(*p))
|
while (IsSpace(*p))
|
||||||
p++;
|
p++;
|
||||||
for (; *p; p++)
|
for (; *p; p++)
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* JSON but use AmountFromValue and ValueFromAmount for that.
|
* JSON but use AmountFromValue and ValueFromAmount for that.
|
||||||
*/
|
*/
|
||||||
std::string FormatMoney(const CAmount& n);
|
std::string FormatMoney(const CAmount& n);
|
||||||
|
/** Parse an amount denoted in full coins. E.g. "0.0034" supplied on the command line. **/
|
||||||
NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet);
|
NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet);
|
||||||
NODISCARD bool ParseMoney(const char* pszIn, CAmount& nRet);
|
|
||||||
|
|
||||||
#endif // BITCOIN_UTIL_MONEYSTR_H
|
#endif // BITCOIN_UTIL_MONEYSTR_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user