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:
parent
6e1c09263f
commit
3912ea99c3
@ -204,7 +204,7 @@ void SHA256::update(ArrayRef<uint8_t> Data) {
|
|||||||
// Fast buffer filling for large inputs.
|
// Fast buffer filling for large inputs.
|
||||||
while (Data.size() >= BLOCK_LENGTH) {
|
while (Data.size() >= BLOCK_LENGTH) {
|
||||||
assert(InternalState.BufferOffset == 0);
|
assert(InternalState.BufferOffset == 0);
|
||||||
assert(BLOCK_LENGTH % 4 == 0);
|
static_assert(BLOCK_LENGTH % 4 == 0, "");
|
||||||
constexpr size_t BLOCK_LENGTH_32 = BLOCK_LENGTH / 4;
|
constexpr size_t BLOCK_LENGTH_32 = BLOCK_LENGTH / 4;
|
||||||
for (size_t I = 0; I < BLOCK_LENGTH_32; ++I)
|
for (size_t I = 0; I < BLOCK_LENGTH_32; ++I)
|
||||||
InternalState.Buffer.L[I] = support::endian::read32be(&Data[I * 4]);
|
InternalState.Buffer.L[I] = support::endian::read32be(&Data[I * 4]);
|
||||||
|
Loading…
Reference in New Issue
Block a user