diff options
author | Henner Zeller <h.zeller@acm.org> | 2020-04-14 14:19:38 -0700 |
---|---|---|
committer | Henner Zeller <h.zeller@acm.org> | 2020-04-14 14:19:38 -0700 |
commit | 5c6e68167332b362a2479a9ee427fefab0839874 (patch) | |
tree | 5488dcb2d38bd85b12b12142f5b100a549156f84 /libs/sha1 | |
parent | 6c16fd760b611441aaa8a9dd9ee1714c7750127a (diff) | |
download | yosys-5c6e68167332b362a2479a9ee427fefab0839874.tar.gz yosys-5c6e68167332b362a2479a9ee427fefab0839874.tar.bz2 yosys-5c6e68167332b362a2479a9ee427fefab0839874.zip |
Use static constexpr instead of static const where possible.
In particular inside class declarations, a static const
assignment is technically not a definition, while constexpr is.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
Diffstat (limited to 'libs/sha1')
-rw-r--r-- | libs/sha1/sha1.h | 6 |
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; |