refactor(Core): apply clang-tidy modernize-use-nodiscard (#3835)

This commit is contained in:
Francesco Borzì
2020-12-06 19:39:48 +01:00
committed by GitHub
parent d4a58700d4
commit 161302252e
82 changed files with 1565 additions and 1569 deletions

View File

@@ -67,7 +67,7 @@ public:
return t %= bn;
}
bool isZero() const;
[[nodiscard]] bool isZero() const;
BigNumber ModExp(BigNumber const& bn1, BigNumber const& bn2);
BigNumber Exp(BigNumber const&);
@@ -80,8 +80,8 @@ public:
std::unique_ptr<uint8[]> AsByteArray(int32 minSize = 0, bool littleEndian = true);
char* AsHexStr() const;
char* AsDecStr() const;
[[nodiscard]] char* AsHexStr() const;
[[nodiscard]] char* AsDecStr() const;
private:
struct bignum_st* _bn;

View File

@@ -28,7 +28,7 @@ public:
void Finalize();
uint8* GetDigest(void) { return mDigest; };
int GetLength(void) const { return SHA_DIGEST_LENGTH; };
[[nodiscard]] int GetLength(void) const { return SHA_DIGEST_LENGTH; };
private:
SHA_CTX mC;