diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-11-26 09:05:59 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-11-26 09:05:59 +0000 |
commit | 4848e711076c6ebc5d841feb83baeb6d2bc76c94 (patch) | |
tree | f72d2a024c8ddc89c6915d586e936185cbfc2e77 /src/base58.cpp | |
parent | 50091592dd875a1c94030dbed74112b003732d68 (diff) |
scripted-diff: Use [[nodiscard]] (C++17) instead of NODISCARD
-BEGIN VERIFY SCRIPT-
sed -i "s/NODISCARD/[[nodiscard]]/g" $(git grep -l "NODISCARD" ":(exclude)src/bench/nanobench.h" ":(exclude)src/attributes.h")
-END VERIFY SCRIPT-
Diffstat (limited to 'src/base58.cpp')
-rw-r--r-- | src/base58.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base58.cpp b/src/base58.cpp index 0dc6044145..780846c6c5 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -35,7 +35,7 @@ static const int8_t mapBase58[256] = { -1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1, }; -NODISCARD static bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch, int max_ret_len) +[[nodiscard]] static bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch, int max_ret_len) { // Skip leading spaces. while (*psz && IsSpace(*psz)) @@ -141,7 +141,7 @@ std::string EncodeBase58Check(Span<const unsigned char> input) return EncodeBase58(vch); } -NODISCARD static bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet, int max_ret_len) +[[nodiscard]] static bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet, int max_ret_len) { if (!DecodeBase58(psz, vchRet, max_ret_len > std::numeric_limits<int>::max() - 4 ? std::numeric_limits<int>::max() : max_ret_len + 4) || (vchRet.size() < 4)) { |