mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
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-
This commit is contained in:
parent
50091592dd
commit
4848e71107
17 changed files with 54 additions and 54 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue