Skip to content

Commit

Permalink
fix adler.h
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed May 22, 2020
1 parent 29c156d commit a9f790a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/utils/adler32.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

namespace fizzy
{
// This calcualtes the Adler-32 checksum of the data.
// This calculates the Adler-32 checksum of the data.
// It is used in benchmarking.
inline uint32_t adler32(bytes_view data)
{
constexpr uint32_t mod = 65521;
uint32_t a = 1;
uint32_t b = 0;

for (auto v : data)
for (const auto v : data)
{
a = (a + v) % mod;
b = (b + a) % mod;
Expand Down

0 comments on commit a9f790a

Please sign in to comment.