Skip to content

Commit fab30b6

Browse files
author
MarcoFalke
committed
util: Remove unused ParseMoney that takes a c_str
1 parent e5753fa commit fab30b6

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/util/moneystr.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,10 @@ bool ParseMoney(const std::string& str, CAmount& nRet)
3636
if (!ValidAsCString(str)) {
3737
return false;
3838
}
39-
return ParseMoney(str.c_str(), nRet);
40-
}
4139

42-
bool ParseMoney(const char* pszIn, CAmount& nRet)
43-
{
4440
std::string strWhole;
4541
int64_t nUnits = 0;
46-
const char* p = pszIn;
42+
const char* p = str.c_str();
4743
while (IsSpace(*p))
4844
p++;
4945
for (; *p; p++)

src/util/moneystr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* JSON but use AmountFromValue and ValueFromAmount for that.
1919
*/
2020
std::string FormatMoney(const CAmount& n);
21+
/** Parse an amount denoted in full coins. E.g. "0.0034" supplied on the command line. **/
2122
NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet);
22-
NODISCARD bool ParseMoney(const char* pszIn, CAmount& nRet);
2323

2424
#endif // BITCOIN_UTIL_MONEYSTR_H

0 commit comments

Comments
 (0)