aboutsummaryrefslogtreecommitdiff
path: root/src/util/moneystr.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-09-25 07:00:36 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-11-05 17:03:11 +0100
commit9cc0230cfc1ae9b9c1c905cd9ac613bc98bfa43a (patch)
treec3cd7df7ea0228dee67b7160ba960a6eba5bbac4 /src/util/moneystr.h
parent579497e77a3a71b2d8e44a6a3e00a8a46366d5c0 (diff)
downloadbitcoin-9cc0230cfc1ae9b9c1c905cd9ac613bc98bfa43a.tar.xz
Add NODISCARD to all {Decode,Parse}[...](...) functions returning bool. Sort includes.
Diffstat (limited to 'src/util/moneystr.h')
-rw-r--r--src/util/moneystr.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/moneystr.h b/src/util/moneystr.h
index 9133f46d5d..b8e2812a96 100644
--- a/src/util/moneystr.h
+++ b/src/util/moneystr.h
@@ -9,16 +9,17 @@
#ifndef BITCOIN_UTIL_MONEYSTR_H
#define BITCOIN_UTIL_MONEYSTR_H
-#include <stdint.h>
-#include <string>
-
#include <amount.h>
+#include <attributes.h>
+
+#include <cstdint>
+#include <string>
/* Do not use these functions to represent or parse monetary amounts to or from
* JSON but use AmountFromValue and ValueFromAmount for that.
*/
std::string FormatMoney(const CAmount& n);
-bool ParseMoney(const std::string& str, CAmount& nRet);
-bool ParseMoney(const char* pszIn, CAmount& nRet);
+NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet);
+NODISCARD bool ParseMoney(const char* pszIn, CAmount& nRet);
#endif // BITCOIN_UTIL_MONEYSTR_H