diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-09-07 06:16:46 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-09-07 06:16:46 -0400 |
commit | c1556295e60e435883c6976aeaf1a2be6606c738 (patch) | |
tree | 3bc407f76bf4f371bb764bb4abaec1aa75a650a6 /crc.h | |
parent | 6e324c161f9fdb360cdf85efc6693e64ce8686bc (diff) | |
download | cryptopp-git-c1556295e60e435883c6976aeaf1a2be6606c738.tar.gz |
Add constexpr-ness to StaticAlgorithmName member function
Diffstat (limited to 'crc.h')
-rw-r--r-- | crc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -31,7 +31,7 @@ public: void Update(const byte *input, size_t length);
void TruncatedFinal(byte *hash, size_t size);
unsigned int DigestSize() const {return DIGESTSIZE;}
- static const char * StaticAlgorithmName() {return "CRC32";}
+ CRYPTOPP_CONSTEXPR static const char *StaticAlgorithmName() {return "CRC32";}
std::string AlgorithmName() const {return StaticAlgorithmName();}
void UpdateByte(byte b) {m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc);}
@@ -55,7 +55,7 @@ public: void Update(const byte *input, size_t length);
void TruncatedFinal(byte *hash, size_t size);
unsigned int DigestSize() const {return DIGESTSIZE;}
- static const char * StaticAlgorithmName() {return "CRC32C";}
+ CRYPTOPP_CONSTEXPR static const char *StaticAlgorithmName() {return "CRC32C";}
std::string AlgorithmName() const {return StaticAlgorithmName();}
void UpdateByte(byte b) {m_crc = m_tab[CRC32_INDEX(m_crc) ^ b] ^ CRC32_SHIFTED(m_crc);}
|