aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-02-29 00:27:48 +0700
committerMarcoFalke <[email protected]>2020-02-29 00:25:37 +0700
commitfab30b61eb51538a4db62e34f7133c44575b3fe9 (patch)
tree4c73aa9f55463ae61fbf0e3237358e7fe26efb51
parentMerge #17921: test: test OP_CSV empty stack fail in feature_csv_activation.py (diff)
downloaddiscoin-fab30b61eb51538a4db62e34f7133c44575b3fe9.tar.xz
discoin-fab30b61eb51538a4db62e34f7133c44575b3fe9.zip
util: Remove unused ParseMoney that takes a c_str
-rw-r--r--src/util/moneystr.cpp6
-rw-r--r--src/util/moneystr.h2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/util/moneystr.cpp b/src/util/moneystr.cpp
index 2797f450c..981cb1b26 100644
--- a/src/util/moneystr.cpp
+++ b/src/util/moneystr.cpp
@@ -36,14 +36,10 @@ bool ParseMoney(const std::string& str, CAmount& nRet)
if (!ValidAsCString(str)) {
return false;
}
- return ParseMoney(str.c_str(), nRet);
-}
-bool ParseMoney(const char* pszIn, CAmount& nRet)
-{
std::string strWhole;
int64_t nUnits = 0;
- const char* p = pszIn;
+ const char* p = str.c_str();
while (IsSpace(*p))
p++;
for (; *p; p++)
diff --git a/src/util/moneystr.h b/src/util/moneystr.h
index 027c7e2e5..d8b08adc2 100644
--- a/src/util/moneystr.h
+++ b/src/util/moneystr.h
@@ -18,7 +18,7 @@
* JSON but use AmountFromValue and ValueFromAmount for that.
*/
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 char* pszIn, CAmount& nRet);
#endif // BITCOIN_UTIL_MONEYSTR_H