summaryrefslogtreecommitdiff
path: root/crc.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2016-09-07 06:16:46 -0400
committerJeffrey Walton <noloader@gmail.com>2016-09-07 06:16:46 -0400
commitc1556295e60e435883c6976aeaf1a2be6606c738 (patch)
tree3bc407f76bf4f371bb764bb4abaec1aa75a650a6 /crc.h
parent6e324c161f9fdb360cdf85efc6693e64ce8686bc (diff)
downloadcryptopp-git-c1556295e60e435883c6976aeaf1a2be6606c738.tar.gz
Add constexpr-ness to StaticAlgorithmName member function
Diffstat (limited to 'crc.h')
-rw-r--r--crc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/crc.h b/crc.h
index 89b68629..44e0e2f7 100644
--- a/crc.h
+++ b/crc.h
@@ -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);}