1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00

[Support] Use static_assert instead of assert (NFC)

Identified with misc-static-assert.
This commit is contained in:
Kazu Hirata 2021-02-18 22:46:41 -08:00
parent 6e1c09263f
commit 3912ea99c3

View File

@ -204,7 +204,7 @@ void SHA256::update(ArrayRef<uint8_t> Data) {
// Fast buffer filling for large inputs.
while (Data.size() >= BLOCK_LENGTH) {
assert(InternalState.BufferOffset == 0);
assert(BLOCK_LENGTH % 4 == 0);
static_assert(BLOCK_LENGTH % 4 == 0, "");
constexpr size_t BLOCK_LENGTH_32 = BLOCK_LENGTH / 4;
for (size_t I = 0; I < BLOCK_LENGTH_32; ++I)
InternalState.Buffer.L[I] = support::endian::read32be(&Data[I * 4]);