aboutsummaryrefslogtreecommitdiffstats
path: root/libs/sha1
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-04-16 13:28:03 +0000
committerGitHub <noreply@github.com>2020-04-16 13:28:03 +0000
commite1f5145afaad3147809d80adfa56048fffc5a603 (patch)
treefb433bd2dcd356defa04d6fe71a6e827eb49fe2c /libs/sha1
parent2b57c06360fd453840aa1e3b76a410ad300ae197 (diff)
parent5c6e68167332b362a2479a9ee427fefab0839874 (diff)
downloadyosys-e1f5145afaad3147809d80adfa56048fffc5a603.tar.gz
yosys-e1f5145afaad3147809d80adfa56048fffc5a603.tar.bz2
yosys-e1f5145afaad3147809d80adfa56048fffc5a603.zip
Merge pull request #1937 from hzeller/consexpr-opportunity
Use static constexpr instead of static const where possible.
Diffstat (limited to 'libs/sha1')
-rw-r--r--libs/sha1/sha1.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/sha1/sha1.h b/libs/sha1/sha1.h
index 9f526376e..b1346b548 100644
--- a/libs/sha1/sha1.h
+++ b/libs/sha1/sha1.h
@@ -35,9 +35,9 @@ public:
static std::string from_file(const std::string &filename);
private:
- static const unsigned int DIGEST_INTS = 5; /* number of 32bit integers per SHA1 digest */
- static const unsigned int BLOCK_INTS = 16; /* number of 32bit integers per SHA1 block */
- static const unsigned int BLOCK_BYTES = BLOCK_INTS * 4;
+ static constexpr unsigned int DIGEST_INTS = 5; /* number of 32bit integers per SHA1 digest */
+ static constexpr unsigned int BLOCK_INTS = 16; /* number of 32bit integers per SHA1 block */
+ static constexpr unsigned int BLOCK_BYTES = BLOCK_INTS * 4;
uint32_t digest[DIGEST_INTS];
std::string buffer;